Exemple #1
0
        // constructor
        public Mode(TargetCharacter targetCharacter)
        {
            // json settings
            JSON_SETTINGS = new Newtonsoft.Json.JsonSerializerSettings();
            JSON_SETTINGS.TypeNameHandling = Newtonsoft.Json.TypeNameHandling.Auto;

            //
            _targetCharacter = targetCharacter;

            _scenario = null;
            _caseKey = -1;

            // events
            _cmdLinesEvent = new CmdLinesEvent();
            _cmdTextEvent = new CmdTextEvent();
            _cmdAppearEvent = new CmdAppearEvent();
            _cmdBackgroundEvent = new CmdBackgroundEvent();
            _cmdMiniPictureEvent = new CmdMiniPictureEvent();
            _cmdPictureEvent = new CmdPictureEvent();
            _cmdFilterEvent = new CmdFilterEvent();
            _cmdSEEvent = new CmdSEEvent();
            _cmdFeelingEvent = new CmdFeelingEvent();
            _cmdSwitchEvent = new CmdSwitchEvent();
            _cmdTargetAppearEvent = new CmdTargetAppearEvent();
            _cmdDisappearEvent = new CmdDisappearEvent();

            _scenarioStartEvent = new ScenarioStartEvent();
            _scenarioEndEvent = new ScenarioEndEvent();

            _selectTargetEvent = new SelectTargetEvent();

            //
            if (null != TargetCharacter)
                TargetCharacter.AttachTo(CmdFeelingEvent);
        }
Exemple #2
0
        //
        public void NextCmd()
        {
            if (_isEndedScenario)
            {
                _isEndedScenario = false;
                _scenario = null;

                ScenarioEndEvent.Invoke();
                return;
            }

            if (null == _scenario)
            {
                Log.Error("not found scenario, load please");
                return;
            }

            play();
        }