Example #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);
        }
Example #2
0
        public void Set(TargetCharacter targetCharacter)
        {
            if (null == targetCharacter)
            {
                Log.Error("not found target character");
                return;
            }

            _targetCharacter = targetCharacter;
            _targetCharacter.AttachTo(CmdFeelingEvent);
        }