using System; using Woodpecker.Core; using Woodpecker.Sessions; using Woodpecker.Game.Users; using Woodpecker.Game.Rooms.Instances; using Woodpecker.Game.Rooms.Pathfinding; namespace Woodpecker.Game.Arcade { /// /// Represents a player in an arcade game. /// public class arcadeGamePlayer { #region Fields /// /// The database ID of the user this arcade game player represents. /// public int userID; /// /// True if this game player has created the game it belongs to. /// public bool isGameOwner; /// /// The ID of the team this game player is currently in. Zero-based. /// public int teamID; /// /// The ID that represents the game player in the lobby/arena. /// public int roomUnitID; /// /// The username of this /// public string Username { get { Session pSession = ObjectTree.Game.Users.getUserSession(this.userID); if (pSession != null) // Users session is still active return pSession.User.Username; else return ObjectTree.Game.Users.getUsername(this.userID); } } #endregion } }