input fixes!
This commit is contained in:
@@ -54,9 +54,11 @@ impl Game for TestGame {
|
||||
let objs = &mut self.game_objects;
|
||||
let components = &mut self.components;
|
||||
|
||||
components.iter_mut().for_each(|component| {
|
||||
component.update(frame_time, &input, renderer, objs);
|
||||
});
|
||||
if !self.paused {
|
||||
components.iter_mut().for_each(|component| {
|
||||
component.update(frame_time, &input, renderer, objs);
|
||||
});
|
||||
}
|
||||
|
||||
// User interaction
|
||||
if self.input.button_just_released("quit") {
|
||||
@@ -123,7 +125,7 @@ impl TestGame {
|
||||
pub fn new(toml_path: &str, log_config: LogConfig) -> TestGame {
|
||||
TestGame {
|
||||
input: InputState::new(toml_path, log_config),
|
||||
player: Player::new(),
|
||||
player: Player::new(3., 30.),
|
||||
game_objects: vec![],
|
||||
text_objects: vec![],
|
||||
log_config,
|
||||
|
||||
Reference in New Issue
Block a user