16 if (_idActor.Contains(
"?"))
20 this.idActor = _idActor.Replace(
"?",
"");
25 public DramaEventTalk(
string _idActor,
string _text, List<DramaChoice> listChoice =
null)
27 if (_idActor.Contains(
"?"))
31 this.idActor = _idActor.Replace(
"?",
"");
33 if (listChoice !=
null)
37 this.AddChoice(choice);
45 this.choices.Add(choice);
49 public override bool Play()
51 if (this.progress == 0)
54 if (this.sequence.firstTalk ==
null)
56 this.sequence.firstTalk =
this;
59 this.sequence.dialog.SetActive(
true);
60 base.actor.Talk(this.sequence.message + ((
this.funcText !=
null) ?
this.funcText() :
this.text),
this.choices,
this.center,
this.unknown);
61 this.sequence.message =
"";
66 this.timer += Time.deltaTime;
67 if (this.timer < 0.08f)
71 if (!this.canCancel || (!EInput.rightMouse.down && !Input.GetKeyDown(KeyCode.Escape) && !Input.GetKeyDown(KeyCode.LeftShift)))
76 if (dramaChoice.activeCondition ==
null || dramaChoice.activeCondition())
78 string inputString = Input.inputString;
79 if (dramaChoice.button && inputString == ((num + 1).ToString() ??
""))
81 if (dramaChoice.button.soundClick)
83 SoundManager.current.Play(dramaChoice.button.soundClick);
85 dramaChoice.button.onClick.Invoke();
91 if (num != 0 || (!EInput.leftMouse.down && !EInput.rightMouse.down && !Input.GetKeyDown(KeyCode.KeypadEnter) && !Input.GetKey(KeyCode.LeftControl) && EInput.action != EAction.Confirm && EInput.action != EAction.Wait && !Input.GetKeyDown(KeyCode.Return) && !Input.GetKeyDown(KeyCode.Escape)))
96 if (!(
EClass.ui.GetTopLayer() == base.layer))
100 Typewriter typewriter = this.sequence.dialog.textMain.typewriter;
101 if (typewriter && !typewriter.IsFinished)
106 base.actor.gameObject.SetActive(
false);
107 EClass.Sound.Play(
"click_chat");
110 if (this.idJump.IsEmpty())
112 this.sequence.PlayNext();
116 this.sequence.Play(this.idJump);
120 this.sequence.tempEvents.Clear();
121 if (!this.idJump.IsEmpty())
123 this.sequence.Play(this.idJump);
131 this.sequence.tempEvents.Clear();
133 EClass.Sound.Play(
"click_chat");
134 if (this.idCancelJump ==
"back")
138 if (this.idCancelJump.IsEmpty())
140 this.sequence.Exit();
144 this.sequence.Play(this.idCancelJump);
152 public void InitDialog()
154 if (this.idActor ==
"*")
156 base.manager.SetDialog(
"Mono");
158 if (this.idActor ==
"*2")
160 base.manager.SetDialog(
"Default2");
162 base.manager.imageBG.color = ((this.idActor ==
"*") ?
new Color(0.6f, 0.6f, 0.6f) : Color.white);
166 public void ResetDialog()
168 base.manager.imageBG.color = Color.white;
169 if (this.idActor ==
"*" || this.idActor ==
"*2")
171 base.manager.SetDialog(
"Default");
179 public string idCancelJump;
182 public List<DramaChoice> choices =
new List<DramaChoice>();
188 public bool canCancel;
197 public Func<string> funcText;