Struct libsm64::MarioInput[][src]

pub struct MarioInput {
    pub cam_look_x: f32,
    pub cam_look_z: f32,
    pub stick_x: f32,
    pub stick_y: f32,
    pub button_a: bool,
    pub button_b: bool,
    pub button_z: bool,
}
Expand description

The input for a frame of Mario’s logic

Fields

cam_look_x: f32

The position of the camera on the x-axis, used to adjust the movement of mario based on his postion relative to the camera

cam_look_z: f32

The position of the camera on the z-axis, used to adjust the movement of mario based on his postion relative to the camera

stick_x: f32

The input of the analog control on the x-axis (-1.0..1.0)

stick_y: f32

The input of the analog control on the y-axis (-1.0..1.0)

button_a: bool

Is the A button pressed

button_b: bool

Is the B button pressed

button_z: bool

Is the Z button pressed

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.