PlayerIndexEventArgs.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #region File Description
  2. //-----------------------------------------------------------------------------
  3. // PlayerIndexEventArgs.cs
  4. //
  5. // 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;
  12. #endregion
  13. namespace GameStateManagement
  14. {
  15. /// <summary>
  16. /// Custom event argument which includes the index of the player who
  17. /// triggered the event. This is used by the MenuEntry.Selected event.
  18. /// </summary>
  19. class PlayerIndexEventArgs : EventArgs
  20. {
  21. /// <summary>
  22. /// Constructor.
  23. /// </summary>
  24. public PlayerIndexEventArgs(PlayerIndex playerIndex)
  25. {
  26. this.playerIndex = playerIndex;
  27. }
  28. /// <summary>
  29. /// Gets the index of the player who triggered this event.
  30. /// </summary>
  31. public PlayerIndex PlayerIndex
  32. {
  33. get { return playerIndex; }
  34. }
  35. PlayerIndex playerIndex;
  36. }
  37. }