Beispiel #1
0
    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();
    }
Beispiel #2
0
        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"));
            }
        }
Beispiel #3
0
 private void Reset() => MinigameHandler.ResetTTT();