pub struct FishingAnimState { /* private fields */ }Expand description
Frame-driven state of the rod animation. Constructed when a rod use
passes the game’s eligibility gates; ticked once per frame by the update
loop (which freezes gameplay while it runs); when Self::is_done the
result text is queued.
Implementations§
Source§impl FishingAnimState
impl FishingAnimState
pub fn new(facing: Direction, bite: bool) -> Self
pub fn phase(&self) -> FishingAnimPhase
pub fn is_done(&self) -> bool
Sourcepub fn pose_active(&self) -> bool
pub fn pose_active(&self) -> bool
Whether the player is holding the fishing pose (pose + rod shown). False during the initial delay and after the anim ends.
Sourcepub fn rod_visible(&self) -> bool
pub fn rod_visible(&self) -> bool
Whether the rod OAM piece is drawn this frame. Hidden during the bubble for the up-facing player, and not yet present during the cast delay.
Sourcepub fn bubble_active(&self) -> bool
pub fn bubble_active(&self) -> bool
Whether the “!” emotion bubble is displayed above the player.
Sourcepub fn player_shake_offset(&self) -> i32
pub fn player_shake_offset(&self) -> i32
Vertical offset (±1 px) of the player sprite and rod during the bite shake.
Trait Implementations§
Source§impl Clone for FishingAnimState
impl Clone for FishingAnimState
Source§fn clone(&self) -> FishingAnimState
fn clone(&self) -> FishingAnimState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FishingAnimState
Auto Trait Implementations§
impl Freeze for FishingAnimState
impl RefUnwindSafe for FishingAnimState
impl Send for FishingAnimState
impl Sync for FishingAnimState
impl Unpin for FishingAnimState
impl UnsafeUnpin for FishingAnimState
impl UnwindSafe for FishingAnimState
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
Mutably borrows from an owned value. Read more