|
|
|
@ -53,7 +53,7 @@ namespace Game { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private IEnumerator SpawnLoop(Spawnable spawnable) { |
|
|
|
|
SpawnRate required = Settings.SpawnRates[spawnable]; |
|
|
|
|
SpawnRate required = RoomSettings.SpawnRates[spawnable]; |
|
|
|
|
if (required == SpawnRate.Never) |
|
|
|
|
yield break; |
|
|
|
|
float baseSeconds = spawnRates.First(s => s.spawnable == spawnable).values.First(v => v.spawnRate == required).baseSeconds; |
|
|
|
@ -89,12 +89,12 @@ namespace Game { |
|
|
|
|
var p2Obj = Instantiate(playerPrefab); |
|
|
|
|
|
|
|
|
|
Player p1, p2; |
|
|
|
|
switch (Settings.Type) { |
|
|
|
|
switch (RoomSettings.Type) { |
|
|
|
|
case Type.AI: |
|
|
|
|
p1 = p1Obj.AddComponent<AIPlayer>(); |
|
|
|
|
p2 = p2Obj.AddComponent<AIPlayer>(); |
|
|
|
|
((AIPlayer) p1).Difficulty = Settings.AIDifficulty; |
|
|
|
|
((AIPlayer) p2).Difficulty = Settings.AIDifficulty; |
|
|
|
|
((AIPlayer) p1).Difficulty = RoomSettings.AIDifficulty; |
|
|
|
|
((AIPlayer) p2).Difficulty = RoomSettings.AIDifficulty; |
|
|
|
|
break; |
|
|
|
|
case Type.RealOnline: |
|
|
|
|
p1 = p1Obj.AddComponent<RealPlayer>(); |
|
|
|
@ -111,7 +111,7 @@ namespace Game { |
|
|
|
|
p1 = p1Obj.AddComponent<RealPlayer>(); |
|
|
|
|
p2 = p2Obj.AddComponent<AIPlayer>(); |
|
|
|
|
((RealPlayer) p1).isThisClient = true; |
|
|
|
|
((AIPlayer) p2).Difficulty = Settings.AIDifficulty; |
|
|
|
|
((AIPlayer) p2).Difficulty = RoomSettings.AIDifficulty; |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
throw new ArgumentOutOfRangeException(); |
|
|
|
|