Move.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #region File Description
  2. //-----------------------------------------------------------------------------
  3. // Move.cs
  4. //
  5. // Microsoft XNA Community Game Platform
  6. // Copyright (C) Microsoft Corporation. All rights reserved.
  7. //-----------------------------------------------------------------------------
  8. #endregion
  9. #region Using Statements
  10. using System;
  11. using Microsoft.Xna.Framework.Input;
  12. #endregion
  13. namespace InputSequenceSample
  14. {
  15. /// <summary>
  16. /// Describes a sequences of buttons which must be pressed to active the move.
  17. /// A real game might add a virtual PerformMove() method to this class.
  18. /// </summary>
  19. class Move
  20. {
  21. public string Name;
  22. // The sequence of button presses required to activate this move.
  23. public Buttons[] Sequence;
  24. // Set this to true if the input used to activate this move may
  25. // be reused as a component of longer moves.
  26. public bool IsSubMove;
  27. public Move(string name, params Buttons[] sequence)
  28. {
  29. Name = name;
  30. Sequence = sequence;
  31. }
  32. }
  33. }