Beispiel #1
0
        public void Dispose()
        {
            _banzaiTiles.Clear();
            _pucks.Clear();

            if (floorMap != null)
                Array.Clear(floorMap, 0, floorMap.Length);

            if (field != null)
                field.Dispose();

            _room = null;
            _banzaiTiles = null;
            _pucks = null;
            floorMap = null;
            field = null;
        }
Beispiel #2
0
        public void BanzaiStart()
        {
            if (banzaiStarted)
                return;

            floorMap = new byte[_room.GetGameMap().Model.MapSizeY, _room.GetGameMap().Model.MapSizeX];
            field = new GameField(floorMap, true);
            timestarted = PlusEnvironment.GetUnixTimestamp();
            _room.GetGameManager().LockGates();
            for (int i = 1; i < 5; i++)
            {
                _room.GetGameManager().Points[i] = 0;
            }

            foreach (Item tile in _banzaiTiles.Values)
            {
                tile.ExtraData = "1";
                tile.value = 0;
                tile.team = TEAM.NONE;
                tile.UpdateState();
            }

            this.ResetTiles();
            banzaiStarted = true;

            _room.GetWired().TriggerEvent(WiredBoxType.TriggerGameStarts, null);

            foreach (RoomUser user in _room.GetRoomUserManager().GetRoomUsers())
            {
                user.LockedTilesCount = 0;
            }
        }