Player() { tokenObjects = new GameObject[Constants.MAX_TOKENS_PER_PLAYER]; tokens = new Token[Constants.MAX_TOKENS_PER_PLAYER]; _status = Enums.PlayerStatus.Playing; _result = Enums.PlayerResult.InProgress; }
public SeatInfoPacket(int tableid, byte seat, Enums.PlayerStatus status, PlayerInfoPacket player) { this.tableid = tableid; this.seat = seat; this.status = status; this.player = player; }
public void load(PacketInputStream ps) { tableid = ps.loadInt(); seat = ps.loadByte(); status = Enums.makePlayerStatus(ps.loadUnsignedByte()); player = new PlayerInfoPacket(); player.load(ps); }
/// <summary> /// Checks if a bot is in the same cell as a player. /// If the player dies, the map gets reset. /// If the player dies, the map gets reset. /// </summary> private void CheckPlayerAndBots() { Enums.PlayerStatus playerAlive = _maps[_currentMap].CheckBotOnPlayer(); switch (playerAlive) { case Enums.PlayerStatus.Dead: Reset(); break; case Enums.PlayerStatus.Win: NextLevel(); Reset(); break; } }