void ITimeline.RemoveEvent(ETimelineCycleType type, TimelineEventHandler handler) { switch (type) { case ETimelineCycleType.GraphStart: graphStartHandler -= handler; break; case ETimelineCycleType.GraphEnd: graphEndHandler -= handler; break; case ETimelineCycleType.BehaviorStart: behaviorStartHandler -= handler; break; case ETimelineCycleType.BehaviorEnd: behaviorEndHandler -= handler; break; case ETimelineCycleType.BehaviorUpdate: behaviorUpdateHandler -= handler; break; default: break; } }
void ITimeline.Dispatch(ETimelineCycleType cycleType, ETimelineEventType type, string str) { switch (cycleType) { case ETimelineCycleType.GraphStart: if (graphStartHandler != null) { graphStartHandler(type, str); } break; case ETimelineCycleType.GraphEnd: if (graphEndHandler != null) { graphEndHandler(type, str); } break; case ETimelineCycleType.BehaviorStart: if (behaviorStartHandler != null) { behaviorStartHandler(type, str); } break; case ETimelineCycleType.BehaviorEnd: if (behaviorEndHandler != null) { behaviorEndHandler(type, str); } break; case ETimelineCycleType.BehaviorUpdate: if (behaviorUpdateHandler != null) { behaviorUpdateHandler(type, str); } break; default: break; } }