using System; using Holo.Managers; using Holo.Virtual.Users; namespace Holo.Virtual.Rooms.Games { /// /// A generic player object for a virtual user that plays a 'BattleBall' or 'SnowStorm' game. /// internal class gamePlayer { #region Declares internal Game Game; /// /// The parent virtualUser object of this player. /// internal virtualUser User; /// /// The ID that represents this player in the arena. /// internal int roomUID; /// /// The ID of the team that this user has joined. /// internal int teamID; /// /// The X position of the user in the arena. /// internal int X; /// /// The Y position of the user in the arena. /// internal int Y; /// /// The rotation of this user in the arena. Range: 0-9 /// internal int Z; /// /// The height of this user in the arena. /// internal int H; /// /// The amount of points that the user has gathered so far. /// internal int Score; /// /// The X position of the destination at moving in the arena. If not moving, then -1. /// internal int goalX; /// /// The Y position of the destination at moving in the arena. /// internal int goalY; internal bool enteringGame; internal bool bbColorTile; #endregion #region Constructor internal gamePlayer(virtualUser User, int roomUID, Game Game) { this.User = User; this.roomUID = roomUID; this.Game = Game; this.teamID = -1; } #endregion #region Functions /// /// Sends a single packet to the parent virtual user of this player. On error the action is skipped. /// /// The packet to send. internal void sendData(string Data) { try { User.sendData(Data); } catch { } } #endregion } }