swamp_advanced_game

Trait ApplicationLogic

Source
pub trait ApplicationLogic: Sized + 'static {
Show 14 methods // Required methods fn new() -> Self; fn tick(&mut self); // Provided methods fn wants_to_quit(&self) -> bool { ... } fn keyboard_input(&mut self, _state: ButtonState, _key_code: KeyCode) { ... } fn cursor_entered(&mut self) { ... } fn cursor_left(&mut self) { ... } fn cursor_moved(&mut self, _position: UVec2) { ... } fn mouse_input(&mut self, _state: ButtonState, _button: MouseButton) { ... } fn mouse_wheel(&mut self, _delta_y: i16) { ... } fn mouse_motion(&mut self, _delta: Vec2) { ... } fn gamepad_activated(&mut self, _gamepad_id: GamePadId, _name: String) { ... } fn gamepad_button_changed( &mut self, _gamepad: &Gamepad, _button: Button, _value: Fp, ) { ... } fn gamepad_axis_changed( &mut self, _gamepad: &Gamepad, _axis: Axis, _value: Fp, ) { ... } fn gamepad_disconnected(&mut self, _gamepad_id: GamePadId) { ... }
}

Required Methods§

Source

fn new() -> Self

Source

fn tick(&mut self)

Provided Methods§

Source

fn wants_to_quit(&self) -> bool

Source

fn keyboard_input(&mut self, _state: ButtonState, _key_code: KeyCode)

Source

fn cursor_entered(&mut self)

Source

fn cursor_left(&mut self)

Source

fn cursor_moved(&mut self, _position: UVec2)

Source

fn mouse_input(&mut self, _state: ButtonState, _button: MouseButton)

Source

fn mouse_wheel(&mut self, _delta_y: i16)

Source

fn mouse_motion(&mut self, _delta: Vec2)

Source

fn gamepad_activated(&mut self, _gamepad_id: GamePadId, _name: String)

Source

fn gamepad_button_changed( &mut self, _gamepad: &Gamepad, _button: Button, _value: Fp, )

Source

fn gamepad_axis_changed(&mut self, _gamepad: &Gamepad, _axis: Axis, _value: Fp)

Source

fn gamepad_disconnected(&mut self, _gamepad_id: GamePadId)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§