pub enum Action {
Click {
col: u16,
row: u16,
},
ClickCenter,
CatchPowerup(u64),
BuyFingerer {
idx: usize,
qty: BuyQty,
},
BuyUpgrade(usize),
PrestigeReset,
UpdateGeometry {
biscuit: Rect,
},
DevAddCuques(f64),
DevForcePowerup(PowerupKind),
Misclick {
col: u16,
row: u16,
},
}Expand description
Commands the input router produces and the sim consumes. The sim is
the sole authority on GameState mutation — input handling translates
raw events (key/mouse/wheel) into these and feeds them through.
Variants§
Click
ClickCenter
CatchPowerup(u64)
Catch the on-screen powerup with the given spawn_id. The id is
minted at spawn time on GameState::next_spawn_id; click hit-test
and the g hotkey both reference instances by id, never by Vec
index, so swap_remove on catch is safe even with multiple
in-flight events between frames.
BuyFingerer
BuyUpgrade(usize)
PrestigeReset
UpdateGeometry
Latest render-computed biscuit geometry, so the sim can place powerups and auto-particles inside the current layout. Powerup rects live on the input/render side (only the click handler reads them).
DevAddCuques(f64)
Dev-only cheats (F-keys). Gated at the input router by debug;
the sim trusts whatever arrives.
DevForcePowerup(PowerupKind)
Force-spawn a powerup of the given kind. Pushes a fresh entry onto
state.powerups — pressing the same F-key twice now produces two
of the same kind on screen.
Misclick
J10: a click that didn’t hit anything actionable. Sim spawns a short-lived “·” misclick particle at the screen point so dead-zone clicks visibly register.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnsafeUnpin for Action
impl UnwindSafe for Action
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more