14 return this.manager.dialog;
24 this.tempEvents.Clear();
30 if (this.actors.ContainsKey(
id))
32 return this.actors[id];
34 if (
EClass.sources.persons.map.ContainsKey(
id))
36 return this.AddActor(
id,
new Person(
id,
null));
38 if (this.actors.Count <= 0)
40 return this.GetActor(
"narrator");
42 return this.actors.FirstItem<string,
DramaActor>();
46 public T GetEvent<T>(
string idStep) where T :
DramaEvent
50 if (dramaEvent.step == idStep)
52 return dramaEvent as T;
61 if (this.actors.ContainsKey(
id))
63 return this.actors[id];
65 DramaActor dramaActor = Util.Instantiate<
DramaActor>(this.manager.moldActor, this.manager.actorPos);
66 dramaActor.Init(
this,
id, person);
67 this.actors.Add(
id, dramaActor);
72 public void AddStep(
string id)
74 this.steps.Add(
id, this.events.Count);
85 if (!e.step.IsEmpty())
87 this.steps.Add(e.step,
this.events.Count);
95 public void PlayNext()
97 this.Play(this.currentEventID + 1);
101 public void Play(
string id)
105 id = this.lastlastStep;
107 if (!
id.IsEmpty() && !this.steps.ContainsKey(
id))
111 this.Play(
string.IsNullOrEmpty(
id) ? 0 : this.steps[
id]);
115 public void Play(
int eventID = 0)
121 if (eventID >= this.events.Count)
130 this.currentEventID = eventID;
131 this.currentEvent = this.events[eventID];
132 this.currentEvent.Reset();
133 string str = eventID.ToString() +
"/";
134 foreach (KeyValuePair<string, int> keyValuePair
in this.steps)
136 if (keyValuePair.Value == eventID)
138 str += keyValuePair.Key;
140 if (keyValuePair.Value == eventID && !keyValuePair.Key.StartsWith(
"flag"))
142 this.lastlastStep = this.lastStep;
143 this.lastStep = keyValuePair.Key;
153 this.isExited =
true;
154 this.currentEvent =
null;
155 this.manager.SetActive(
false);
159 public void OnUpdate()
161 if (this.tempEvents.Count > 0)
163 if (this.tempEvents[0].Play() && this.tempEvents.Count > 0)
165 this.tempEvents.RemoveAt(0);
169 if (this.currentEvent ==
null)
175 string a = this.currentEvent.idJump;
178 if (this.setup.step.IsEmpty())
188 if (this.currentEvent.Play())
201 public Dictionary<string, int> steps =
new Dictionary<string, int>();
204 public Dictionary<string, DramaActor> actors =
new Dictionary<string, DramaActor>();
207 public List<DramaEvent> events =
new List<DramaEvent>();
213 public bool canCancel =
true;
216 public bool isExited;
219 public bool fullPortrait;
225 public List<DramaEvent> tempEvents =
new List<DramaEvent>();
231 public string message =
"";
234 public string skipJump;
237 public string lastStep;
240 public string lastlastStep;
246 private int currentEventID;