private void Awake() { idManager = FindObjectOfType <IdManager>(); minigameHandler = FindObjectOfType <MinigameHandler>(); GetColliderBounds(); var spawnObj = spawnConfig.GetSpawnable(); spawnObjId = idManager.GetObjId(spawnObj); spawnObjType = idManager.GetObjType(spawnObj); maxSpawnables = spawnConfig.GetMaxSpawnables(); minDelay = spawnConfig.GetMinDelay(); maxDelay = spawnConfig.GetMaxDelay(); }
static Config() { MinigameHandler.InitialTriviaSetup(); if (!Directory.Exists("Resources")) { Directory.CreateDirectory("Resources"); } // If the file doesn't exist, WriteAllText with the json // If it exists, deserialize the json into the corresponding object // config.json if (!File.Exists("Resources/config.json")) { File.WriteAllText("Resources/config.json", JsonConvert.SerializeObject(bot, Formatting.Indented)); } else { bot = JsonConvert.DeserializeObject <BotConfig>(File.ReadAllText("Resources/config.json")); } }
private void Reset() => MinigameHandler.ResetTTT();