Description:
Pull out input from FNAGame.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -20,7 +20,8 | |||||
|
20 | typeof(ToggleWindowMessage), //??? |
|
20 | typeof(ToggleWindowMessage), //??? |
|
21 | typeof(ToggleVisibilityMessage), |
|
21 | typeof(ToggleVisibilityMessage), |
|
22 | typeof(TogglePauseMessage), |
|
22 | typeof(TogglePauseMessage), |
|
23 |
typeof(GameRateMessage) |
|
23 | typeof(GameRateMessage), |
|
|
24 | typeof(GameStateMessage))] | ||
|
24 | [Reads(typeof(WindowTypeComponent), |
|
25 | [Reads(typeof(WindowTypeComponent), |
|
25 | typeof(VisibilityComponent))] |
|
26 | typeof(VisibilityComponent))] |
|
26 | public class InputEngine : Engine |
|
27 | public class InputEngine : Engine |
@@ -172,6 +173,14 | |||||
|
172 | } |
|
173 | } |
|
173 | #endif |
|
174 | #endif |
|
174 |
|
175 | ||
|
|
176 | #if DEBUG | ||
|
|
177 | |||
|
|
178 | if (keyboardCur.IsKeyDown(Keys.A) && keyboardPrev.IsKeyUp(Keys.A)) | ||
|
|
179 | { | ||
|
|
180 | SendMessage(new GameStateMessage {isPlaying = false}); | ||
|
|
181 | } | ||
|
|
182 | #endif | ||
|
|
183 | |||
|
175 | if (keyboardCur.IsKeyDown(Keys.Q) && keyboardPrev.IsKeyUp(Keys.Q)) |
|
184 | if (keyboardCur.IsKeyDown(Keys.Q) && keyboardPrev.IsKeyUp(Keys.Q)) |
|
176 | { |
|
185 | { |
|
177 | System.Console.WriteLine("Quitting"); |
|
186 | System.Console.WriteLine("Quitting"); |
@@ -479,17 +479,9 | |||||
|
479 | { |
|
479 | { |
|
480 | sound.Play(volume, pitch, pan); |
|
480 | sound.Play(volume, pitch, pan); |
|
481 | } |
|
481 | } |
|
482 | if (keyboardCur.IsKeyDown(Keys.A) && keyboardPrev.IsKeyUp(Keys.A)) |
|
||
|
483 | { |
|
||
|
484 | this.isPlaying = !this.isPlaying; |
|
||
|
485 | } |
|
||
|
486 | #endregion misc_keys |
|
482 | #endregion misc_keys |
|
487 | // |
|
||
|
488 |
|
|||
|
489 | #endregion input |
|
483 | #endregion input |
|
490 |
|
484 | ||
|
491 |
|
|||
|
492 |
|
|||
|
493 | World.Update(gameTime.ElapsedGameTime.TotalSeconds); |
|
485 | World.Update(gameTime.ElapsedGameTime.TotalSeconds); |
|
494 | this.simulation.update(gameTime.ElapsedGameTime); |
|
486 | this.simulation.update(gameTime.ElapsedGameTime); |
|
495 |
|
487 |
You need to be logged in to leave comments.
Login now