[][src]Struct freenukum::hero::HeroData

pub struct HeroData {
    pub position: Position,
    pub score: Score,
    pub health: Health,
    pub firepower: Firepower,
    pub inventory: Inventory,
    pub fetched_letter_state: FetchedLetterState,
    pub immunity: Immunity,
    pub hidden: bool,
    pub direction: HorizontalDirection,
    pub motion: Motion,
    pub is_shooting: bool,
    pub gets_hurt: bool,
    // some fields omitted
}

Fields

position: Positionscore: Scorehealth: Healthfirepower: Firepowerinventory: Inventoryfetched_letter_state: FetchedLetterStateimmunity: Immunityhidden: booldirection: HorizontalDirectionmotion: Motionis_shooting: boolgets_hurt: bool

Implementations

impl HeroData[src]

pub fn new() -> Self[src]

pub fn reset(&mut self)[src]

pub fn reset_for_level(&mut self)[src]

pub fn next_frame(&mut self)[src]

pub fn render(
    &self,
    renderer: &mut dyn Renderer,
    solids: &LevelSolids,
    draw_collision_bounds: bool
) -> Result<()>
[src]

pub fn enter_level(&mut self, x: i32, y: i32)[src]

pub fn would_collide(&self, solids: &LevelSolids, x: i32, y: i32) -> bool[src]

pub fn update_animation(&mut self)[src]

pub fn jump(&mut self)[src]

pub fn land(&mut self)[src]

pub fn act(
    &mut self,
    solids: &LevelSolids,
    actor_adder: &mut dyn ActorAdder
) -> Result<u8>
[src]

Returns the remaining health

Trait Implementations

impl Debug for HeroData[src]

impl Default for HeroData[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,