Esempio n. 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);
        }
Esempio n. 2
0
        private void start(Sugarism.Scenario model)
        {
            _scenario = new Scenario(model, this);

            ScenarioStartEvent.Invoke();
            NextCmd();
        }