protected void BindPlay(AFlowAction action, Func <bool> condition, float delay, int times) { // 只重置被播放的 action,不负责重置被停止的 action。 // 只被停止的 action 应该由外部负责播放的 Graph 重置。 action.Reset(); playBindings.Add(new ActionBinding(action, condition, delay, times)); }
public int Times; // -1 为无限制 public ActionBinding(AFlowAction action, Func <bool> condition, float delay, int times) { Action = action; Condition = condition; Delay = delay; Times = times; }
protected void BindStop(AFlowAction action, Func <bool> condition, float delay, int times) { stopBindings.Add(new ActionBinding(action, condition, delay, times)); }