public override bool ProcessKeyboard(Keyboard state) { if (state.IsKeyReleased(Keys.Enter)) { DoAction("play"); return(true); } if (state.IsKeyReleased(Keys.C)) { DoAction("create"); return(true); } if (state.IsKeyReleased(Keys.S)) { DoAction("send"); return(true); } if (state.IsKeyReleased(Keys.B)) { DoAction("bind"); return(true); } if (state.IsKeyReleased(Keys.W)) { DoAction("watch"); return(true); } if (state.IsKeyReleased(Keys.P)) { DoAction("play"); return(true); } if (state.IsKeyReleased(Keys.L)) { _controller.PrintMogwaiKeys(); LogInConsole("TASK", "loging public keys into a file."); return(true); } if (state.IsKeyReleased(Keys.T)) { _controller.Tag(); return(true); } if (state.IsKeyReleased(Keys.I)) { _transferFunds = (_transferFunds - 1) % 7 + 2; return(true); } if (state.IsKeyReleased(Keys.Down)) { _controller.Next(); return(true); } if (state.IsKeyReleased(Keys.Up)) { _controller.Previous(); return(true); } if (state.IsKeyReleased(Keys.Right)) { _borderSurface.SetGlyph(0, 0, ++_glyphIndex, Color.DarkCyan); _borderSurface.Print(10, 0, _glyphIndex.ToString(), Color.Yellow); return(true); } if (state.IsKeyReleased(Keys.Left)) { _borderSurface.SetGlyph(0, 0, --_glyphIndex, Color.DarkCyan); _borderSurface.Print(10, 0, _glyphIndex.ToString(), Color.Yellow); return(true); } return(false); }
public override bool ProcessKeyboard(Keyboard state) { if (state.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.Enter)) { return(true); } else if (state.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.C)) { DoAction("create"); return(true); } else if (state.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.S)) { DoAction("send"); return(true); } else if (state.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.B)) { DoAction("bind"); return(true); } else if (state.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.P)) { DoAction("play"); return(true); } else if (state.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.L)) { controller.PrintMogwaiKeys(); LogInConsole("TASK", "loging public keys into a file."); return(true); } else if (state.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.T)) { controller.Tag(); return(true); } else if (state.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.Down)) { controller.Next(); return(true); } else if (state.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.Up)) { controller.Previous(); return(true); } else if (state.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.Right)) { borderSurface.SetGlyph(0, 0, ++glyphIndex, Color.DarkCyan); borderSurface.Print(10, 0, glyphIndex.ToString(), Color.Yellow); return(true); } else if (state.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.Left)) { borderSurface.SetGlyph(0, 0, --glyphIndex, Color.DarkCyan); borderSurface.Print(10, 0, glyphIndex.ToString(), Color.Yellow); return(true); } return(false); }