public ActionEvent(BehaviorNodes.Action action, ActionEventType type, BehaviorExecutionContext bec) { this.Type = type; this.Action = action; this.BEC = bec; }
private void ScheduleAction(BehaviorNodes.Action a, BehaviorExecutionContext bec) { if (a.StartTime.Type == SyncPointType.Unspecified) { a.Event(ActionEventType.start, bec); RunningActions.Add(a); } else { if (a.StartTime.Type == SyncPointType.Absolute) AddTimeline(a.StartTime.AbsoluteValue * Properties.Settings.Default.PlanFPS + currentFrame, new ActionEvent(a, ActionEventType.start, bec)); else if (a.StartTime.Type == SyncPointType.Reference) AddEventline(a.StartTime.ReferenceValue, new ActionEvent(a, ActionEventType.start, bec)); if (a.EndTime.Type == SyncPointType.Absolute) AddTimeline(a.EndTime.AbsoluteValue * Properties.Settings.Default.PlanFPS + currentFrame, new ActionEvent(a, ActionEventType.end, bec)); else if (a.EndTime.Type == SyncPointType.Reference) AddEventline(a.EndTime.ReferenceValue, new ActionEvent(a, ActionEventType.end, bec)); } }