示例#1
0
        private void SaveEvents_AfterLoad(object sender, EventArgs e)
        {
            TimeEvents.DayOfMonthChanged += TimeEvents_DayOfMonthChanged;
            ModConfig config = Helper.ReadConfig <ModConfig>();

            if (config.polly == "on" && pollySetup)
            {
                SpeechHandlerPolly.Monitor = Monitor;
                SpeechHandlerPolly.start(Helper);
            }
            else
            {
                SpeechHandler.start(Helper, Monitor);
            }

            GameEvents.OneSecondTick += GameEvents_OneSecondTick;
            // VoiceControl.start(Monitor);
            ControlEvents.KeyPressed += ControlEvents_KeyPressed;
        }
        private void SaveEvents_AfterLoad(object sender, EventArgs e)
        {
            pollySetup = false;
            checkPollySetup();

            TimeEvents.AfterDayStarted += TimeEvents_AfterDayStarted;
            ModConfig config = Helper.ReadConfig <ModConfig>();

            if (config.polly == "on" && pollySetup)
            {
                SpeechHandlerPolly.Monitor = Monitor;
                SpeechHandlerPolly.start(Helper);
            }
            else
            {
                SpeechHandler.start(Helper, Monitor);
            }

            GameEvents.OneSecondTick += GameEvents_OneSecondTick;
            ControlEvents.KeyPressed += ControlEvents_KeyPressed;
        }