Revamp map route stuff
This commit is contained in:
@@ -30,30 +30,6 @@ public partial class DungeonFloor : Node3D, IDungeonFloor
|
||||
|
||||
}
|
||||
|
||||
public void SpawnEnemies(DungeonFloorNode floorNode)
|
||||
{
|
||||
var enemyOdds = new Godot.Collections.Dictionary<EnemyType, float>
|
||||
{
|
||||
{ EnemyType.Sproingy, floorNode.Sproingy },
|
||||
{ EnemyType.Michael, floorNode.Michael },
|
||||
{ EnemyType.FilthEater, floorNode.FilthEater },
|
||||
{ EnemyType.Sara, floorNode.Sara },
|
||||
{ EnemyType.Ballos, floorNode.Ballos },
|
||||
{ EnemyType.Chinthe, floorNode.Chinthe },
|
||||
{ EnemyType.AmbassadorGreen, floorNode.GreenAmbassador },
|
||||
{ EnemyType.AmbassadorRed, floorNode.RedAmbassador },
|
||||
{ EnemyType.AmbassadorSteel, floorNode.SteelAmbassador },
|
||||
{ EnemyType.AgniDemon, floorNode.AgniDemon },
|
||||
{ EnemyType.AqueousDemon, floorNode.AqueosDemon },
|
||||
{ EnemyType.Palan, floorNode.Palan },
|
||||
{ EnemyType.ShieldOfHeaven, floorNode.ShieldOfHeaven },
|
||||
{ EnemyType.GoldSproingy, floorNode.GoldSproingy },
|
||||
};
|
||||
var monsterRooms = Rooms.OfType<MonsterRoom>();
|
||||
foreach (var room in monsterRooms)
|
||||
room.SpawnEnemies(enemyOdds);
|
||||
}
|
||||
|
||||
public (Vector3 Rotation, Vector3 Position) GetPlayerSpawnPoint() { return (_playerSpawnPoint.Rotation, new Vector3(_playerSpawnPoint.GlobalPosition.X, 0, _playerSpawnPoint.GlobalPosition.Z)); }
|
||||
|
||||
|
||||
@@ -80,4 +56,10 @@ public partial class DungeonFloor : Node3D, IDungeonFloor
|
||||
|
||||
return FindAllDungeonRooms([.. nodesToSearch.SelectMany(x => x.GetChildren())], roomsFound);
|
||||
}
|
||||
|
||||
public IDungeonRoom GetPlayersCurrentRoom()
|
||||
{
|
||||
var playersRoom = Rooms.SingleOrDefault(x => x.IsPlayerInRoom);
|
||||
return playersRoom;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user