diff --git a/Assets/Scripts/Game/GameManager.cs b/Assets/Scripts/Game/GameManager.cs index 2987f52..aeb3d8c 100644 --- a/Assets/Scripts/Game/GameManager.cs +++ b/Assets/Scripts/Game/GameManager.cs @@ -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(); p2 = p2Obj.AddComponent(); - ((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(); @@ -111,7 +111,7 @@ namespace Game { p1 = p1Obj.AddComponent(); p2 = p2Obj.AddComponent(); ((RealPlayer) p1).isThisClient = true; - ((AIPlayer) p2).Difficulty = Settings.AIDifficulty; + ((AIPlayer) p2).Difficulty = RoomSettings.AIDifficulty; break; default: throw new ArgumentOutOfRangeException(); diff --git a/Assets/Scripts/Game/Settings.cs b/Assets/Scripts/Game/RoomSettings.cs similarity index 95% rename from Assets/Scripts/Game/Settings.cs rename to Assets/Scripts/Game/RoomSettings.cs index 9c27659..6a75626 100644 --- a/Assets/Scripts/Game/Settings.cs +++ b/Assets/Scripts/Game/RoomSettings.cs @@ -10,7 +10,7 @@ namespace Game { public enum Spawnable {NewBallTemporary, NewBallPermanent, Modification, Wormhole} public enum WinScore {Default, Custom} - public struct Settings { + public struct RoomSettings { public static Type Type; public static Difficulty AIDifficulty; public static Dictionary SpawnRates; diff --git a/Assets/Scripts/Game/Settings.cs.meta b/Assets/Scripts/Game/RoomSettings.cs.meta similarity index 100% rename from Assets/Scripts/Game/Settings.cs.meta rename to Assets/Scripts/Game/RoomSettings.cs.meta diff --git a/Assets/Scripts/MenuUI.cs b/Assets/Scripts/MenuUI.cs index ece3cb3..dbd2393 100644 --- a/Assets/Scripts/MenuUI.cs +++ b/Assets/Scripts/MenuUI.cs @@ -46,15 +46,15 @@ public class MenuUI : MonoBehaviour { private void JoinPressed(ClickEvent evt) { } private void BotPressed(ClickEvent evt) { - Settings.Type = Type.Hybrid; - Settings.AIDifficulty = Difficulty.VeryHard; + RoomSettings.Type = Type.Hybrid; + RoomSettings.AIDifficulty = Difficulty.VeryHard; SceneManager.LoadScene("Game"); } private void BotsPressed(ClickEvent evt) { - Settings.Type = Type.AI; - Settings.AIDifficulty = Difficulty.VeryHard; + RoomSettings.Type = Type.AI; + RoomSettings.AIDifficulty = Difficulty.VeryHard; SceneManager.LoadScene("Game"); } diff --git a/Assets/UI/Menu.uxml b/Assets/UI/Menu.uxml index a093731..5683da9 100644 --- a/Assets/UI/Menu.uxml +++ b/Assets/UI/Menu.uxml @@ -2,11 +2,11 @@