public Room Clone() { Room clone = new Room(Level, Id, RoomType, Item, RoomUpIndex, RoomStraightIndex, RoomDownIndex); foreach (IEnemy e in _enemies) { clone.AddEnemy(e.EnemyType, e.HP, e.Points, 1); } return clone; }
internal void Navigate(NavigationPaths direction) { Levels currentlevel = _room.Level; if (_room.RoomType == RoomTypes.Trophy) { _room = RoomFactory.GetRoom(currentlevel + 1, 0); //new level, 1st room } else //just a normal room { switch (direction) { case NavigationPaths.Up: _room = RoomFactory.GetRoom(currentlevel, _room.RoomUpIndex); break; case NavigationPaths.Straight: _room = RoomFactory.GetRoom(currentlevel, _room.RoomStraightIndex); break; case NavigationPaths.Down: _room = RoomFactory.GetRoom(currentlevel, _room.RoomDownIndex); break; } } IsDirty = true; }
internal static Room Restart(Room room) { //do we restart the room, or level? //if we restart the room, do we restart with all the enemies or keep the dead? return GetRoom(room.Level, room.Id); }
/// <summary> /// Resets the player's status (weapons, shield, cross etc) to basic or /// </summary> public void ResetPlayerStatus() { _tiltWarnings = 0; //_playerHealtStatus = HealthStates.Normal; for (int i = 0; i < 7; i++) { _belmont[i] = false; _dracula[i] = false; } switch (_playerCharacter) { case Characters.Sypha: _shieldCount = int.MaxValue; _crossCount = int.MaxValue; break; case Characters.Maria: _shieldCount = int.MaxValue; _crossCount = int.MaxValue; break; case Characters.Grant: _shieldCount = 2; _crossCount = 2; break; case Characters.Richter: _shieldCount = 1; _crossCount = 1; break; case Characters.Alucard: _shieldCount = 0; _crossCount = 0; break; default: _shieldCount = 0; _crossCount = 0; _scores[0] = 0; _scores[1] = 0; _scores[2] = 0; _scores[3] = 0; _playerHealthStatus = string.Empty; break; } _room = RoomFactory.Restart(_room); _magic = 0; _weapon = 0; _extraBalls = 0; _hearts = 0; _enemiesKilled = 0; _stageBonus = 0; IsDirty = true; }