2
0

PlayerIndexEventArgs.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. #if IPHONE
  12. using Microsoft.Xna.Framework;
  13. #else
  14. using Microsoft.Xna.Framework;
  15. #endif
  16. #endregion
  17. namespace Microsoft.Xna.Samples.GameStateManagement
  18. {
  19. /// <summary>
  20. /// Custom event argument which includes the index of the player who
  21. /// triggered the event. This is used by the MenuEntry.Selected event.
  22. /// </summary>
  23. class PlayerIndexEventArgs : EventArgs
  24. {
  25. /// <summary>
  26. /// Constructor.
  27. /// </summary>
  28. public PlayerIndexEventArgs(PlayerIndex playerIndex)
  29. {
  30. this.playerIndex = playerIndex;
  31. }
  32. /// <summary>
  33. /// Gets the index of the player who triggered this event.
  34. /// </summary>
  35. public PlayerIndex PlayerIndex
  36. {
  37. get { return playerIndex; }
  38. }
  39. PlayerIndex playerIndex;
  40. }
  41. }