Beispiel #1
0
            public Next(TextScenario scenario)
            {
                Text.Next next = this;
                this.scenario = scenario;
                TextScenario.CurrentCharaData     currentCharaData = scenario.currentCharaData;
                List <TextScenario.IMotion[]>     motionList       = currentCharaData.motionList;
                List <TextScenario.IExpression[]> expressionList   = currentCharaData.expressionList;
                int         cnt   = 0;
                Func <bool> func1 = (Func <bool>)(() => !motionList.IsNullOrEmpty <TextScenario.IMotion[]>() && motionList.SafeGet <TextScenario.IMotion[]>(cnt) != null);
                Func <bool> func2 = (Func <bool>)(() => !expressionList.IsNullOrEmpty <TextScenario.IExpression[]>() && expressionList.SafeGet <TextScenario.IExpression[]>(cnt) != null);

                while (func1() || func2())
                {
                    TextScenario.IMotion[]     motion     = func1() ? motionList[cnt] : (TextScenario.IMotion[])null;
                    TextScenario.IExpression[] expression = func2() ? expressionList[cnt] : (TextScenario.IExpression[])null;
                    this.playList.Add(new List <Action>()
                    {
                        (Action)(() => closure_0.Play(expression)),
                        (Action)(() => closure_0.Play(motion))
                    });
                    ++cnt;
                }
                if (currentCharaData.voiceList.IsNullOrEmpty <TextScenario.IVoice[]>())
                {
                    return;
                }
                this.onChange = (Action)(() => next.Play());
                scenario.VoicePlay(currentCharaData.voiceList, this.onChange, (Action)(() => next.voicePlayEnd = true));
            }
Beispiel #2
0
        public override void Do()
        {
            base.Do();
            Text.Data data = new Text.Data(this.args);
            this.scenario.fontColorKey = data.name;
            if (data.name != string.Empty)
            {
                data.name = this.scenario.ReplaceText(data.name);
            }
            if (data.text != string.Empty)
            {
                data.text = this.scenario.ReplaceText(data.text);
            }
            TextScenario.CurrentCharaData currentCharaData = this.scenario.currentCharaData;
            if (currentCharaData.isSkip || Manager.Config.GameData.NextVoiceStop)
            {
                this.scenario.VoicePlay((List <TextScenario.IVoice[]>)null, (Action)null, (Action)null);
            }
            currentCharaData.isSkip = false;
            this.scenario.captionSystem.SetName(data.name);
            this.scenario.captionSystem.SetText(data.text, false);
            string str = (string)null;

            switch (data.colorKey)
            {
            case "[H]":
                str = MapUIContainer.CharaNameColor(this.scenario.currentChara?.data?.actor);
                break;

            case "[P]":
                str = MapUIContainer.CharaNameColor(this.scenario.player?.actor);
                break;

            case "[M]":
                Actor actor = (Actor)this.scenario.currentChara?.data?.merchantActor;
                if (Object.op_Equality((Object)actor, (Object)null))
                {
                    List <TextScenario.ParamData> heroineList = this.scenario.heroineList;
                    actor = heroineList != null?heroineList.FirstOrDefault <TextScenario.ParamData>((Func <TextScenario.ParamData, bool>)(p => Object.op_Inequality((Object)p.merchantActor, (Object)null)))?.actor : (Actor)null;
                }
                str = MapUIContainer.CharaNameColor(actor);
                break;
            }
            if (str != null)
            {
                data.name = str;
            }
            this.scenario.TextLogCall(data, (IReadOnlyCollection <TextScenario.IVoice[]>)currentCharaData.voiceList);
            this.next = new Text.Next(this.scenario);
        }