PlayerIndexEventArgs.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //-----------------------------------------------------------------------------
  2. // PlayerIndexEventArgs.cs
  3. //
  4. // XNA Community Game Platform
  5. // Copyright (C) Microsoft Corporation. All rights reserved.
  6. //-----------------------------------------------------------------------------
  7. using System;
  8. using Microsoft.Xna.Framework;
  9. namespace GameStateManagement
  10. {
  11. /// <summary>
  12. /// Custom event argument which includes the index of the player who
  13. /// triggered the event. This is used by the MenuEntry.Selected event.
  14. /// </summary>
  15. class PlayerIndexEventArgs : EventArgs
  16. {
  17. /// <summary>
  18. /// Constructor.
  19. /// </summary>
  20. public PlayerIndexEventArgs(PlayerIndex playerIndex)
  21. {
  22. this.playerIndex = playerIndex;
  23. }
  24. /// <summary>
  25. /// Gets the index of the player who triggered this event.
  26. /// </summary>
  27. public PlayerIndex PlayerIndex
  28. {
  29. get { return playerIndex; }
  30. }
  31. PlayerIndex playerIndex;
  32. }
  33. }