Struct catchit::State
[−]
[src]
pub struct State { pub field: Extent, pub hunter: Hunter, pub prey: Object, pub obstacles: Vec<Obstacle>, pub score: u32, pub score_coeff: Scalar, pub obstacle_opacity: Transition, pub attracting_force: Transition, pub last_dt: f64, }
It maintains the state of the game and expects to be updated with time-delta information to compute the next state.
Please note that the coordinates used in the playing field start at 0 and grow
Fields
field | The playing field |
hunter | The player's character |
prey | Hunted the player's character |
obstacles | Obstacles the hunter must avoid to prevent game-over |
score | score of the current game |
score_coeff | multiply prey score with the given value |
obstacle_opacity | transition between opaque and invisible obstacles |
attracting_force | transition between no attracting force and maximum one |
last_dt | Last delta-time during update |