예제 #1
0
        internal void BanzaiStart()
        {
            if (IsBanzaiActive)
                return;

            _room.GetGameManager().StartGame();
            _floorMap = new byte[_room.GetGameMap().Model.MapSizeY, _room.GetGameMap().Model.MapSizeX];
            _field = new GameField(_floorMap, true);
            _timestarted = Yupi.GetUnixTimeStamp();
            _room.GetGameManager().LockGates();

            for (int i = 1; i < 5; i++)
                _room.GetGameManager().Points[i] = 0;

            foreach (RoomItem roomItem in BanzaiTiles.Values)
            {
                roomItem.ExtraData = "1";
                roomItem.Value = 0;
                roomItem.Team = Team.None;
                roomItem.UpdateState();
            }

            ResetTiles();
            IsBanzaiActive = true;
            _room.GetWiredHandler().ExecuteWired(Interaction.TriggerGameStart);

            foreach (RoomUser roomUser in _room.GetRoomUserManager().GetRoomUsers())
                roomUser.LockedTilesCount = 0;
        }
예제 #2
0
 internal void Destroy()
 {
     BanzaiTiles.Clear();
     _pucks.Clear();
     Array.Clear(_floorMap, 0, _floorMap.Length);
     _field.Destroy();
     _room = null;
     BanzaiTiles = null;
     _pucks = null;
     _floorMap = null;
     _field = null;
 }