Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation typo / misattribution #47

Closed
steffahn opened this issue Jun 7, 2022 · 1 comment
Closed

Documentation typo / misattribution #47

steffahn opened this issue Jun 7, 2022 · 1 comment

Comments

@steffahn
Copy link

steffahn commented Jun 7, 2022

Hi, I just noticed that these three fields have their documentation permuted incorrectly:

rusty_engine/src/game.rs

Lines 83 to 96 in 12a0d15

/// INFO - All the keyboard input events. These are text-processor-like events. If you are
/// looking for keyboard events to control movement in a game character, you should use
/// [`Engine::keyboard_state`] instead. For example, one pressed event will fire when you
/// start holding down a key, and then after a short delay additional pressed events will occur
/// at the same rate that additional letters would show up in a word processor. When the key is
/// finally released, a single released event is emitted.
pub keyboard_state: KeyboardState,
/// INFO - The delta time (time between frames) for the current frame as a [`Duration`], perfect
/// for use with [`Timer`](crate::prelude::Timer)s
pub keyboard_events: Vec<KeyboardInput>,
/// INFO - The current state of all the keys on the keyboard. Use this to control movement in
/// your games! A [`KeyboardState`] has helper methods you should use to query the state of
/// specific [`KeyCode`](crate::prelude::KeyCode)s.
pub delta: Duration,

The field order seems decent, so I suppose the documentation should be moved to fix this.

@CleanCut
Copy link
Owner

CleanCut commented Jun 7, 2022

Nice catch, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants