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 | 20 | typeof(ToggleWindowMessage), //??? |
|
21 | 21 | typeof(ToggleVisibilityMessage), |
|
22 | 22 | typeof(TogglePauseMessage), |
|
23 |
typeof(GameRateMessage) |
|
|
23 | typeof(GameRateMessage), | |
|
24 | typeof(GameStateMessage))] | |
|
24 | 25 | [Reads(typeof(WindowTypeComponent), |
|
25 | 26 | typeof(VisibilityComponent))] |
|
26 | 27 | public class InputEngine : Engine |
@@ -172,6 +173,14 | |||
|
172 | 173 | } |
|
173 | 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 | 184 | if (keyboardCur.IsKeyDown(Keys.Q) && keyboardPrev.IsKeyUp(Keys.Q)) |
|
176 | 185 | { |
|
177 | 186 | System.Console.WriteLine("Quitting"); |
@@ -479,17 +479,9 | |||
|
479 | 479 | { |
|
480 | 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 | 482 | #endregion misc_keys |
|
487 | // | |
|
488 | ||
|
489 | 483 | #endregion input |
|
490 | 484 | |
|
491 | ||
|
492 | ||
|
493 | 485 | World.Update(gameTime.ElapsedGameTime.TotalSeconds); |
|
494 | 486 | this.simulation.update(gameTime.ElapsedGameTime); |
|
495 | 487 |
You need to be logged in to leave comments.
Login now