Ejemplo n.º 1
0
        public MonsterGrid(MonsterWithHealthBar monsterUI, Dungeon dungeon)
        {
            _monsterUI = monsterUI;
            MonsterHealth = _monsterUI.MonsterHealth;

            _dungeon = dungeon;
            _activeFloor = _dungeon.Floors[0];
            ActivateMonster(_activeFloor.Monsters);
        }
Ejemplo n.º 2
0
        public bool LoadNextFloor()
        {
            var hasAnotherFloor = false;
            var currentFloorIndex = _dungeon.Floors.IndexOf(_activeFloor);

            var nextFloorIndex = currentFloorIndex + 1;
            if (nextFloorIndex < _dungeon.Floors.Count)
            {
                _activeFloor = _dungeon.Floors[nextFloorIndex];
                ActivateMonster(_activeFloor.Monsters);
                hasAnotherFloor = true;
            }

            return hasAnotherFloor;
        }