public void OnMessage(string msg) { if (OnMessageEvent != null) { CutsceneEventArgs args = new CutsceneEventArgs(); args.msg = msg; OnMessageEvent(this, args); } }
/// <summary> /// On cutscene finish, play the next cutscene. /// </summary> void TimelineQueue_TimelineFinished(object sender, CutsceneEventArgs e) { TimelineManagers[index].TimelineFinished -= TimelineQueue_TimelineFinished; if (TimelineManagers != null && index + 1 < TimelineManagers.Count) { index++; TimelineManagers[index].Play(); TimelineManagers[index].TimelineFinished += TimelineQueue_TimelineFinished; } }