protected override void OnUpdate() { if (mActiveAction != null) { mActiveAction.Update(mDeltaTime); if (mActiveAction.IsDone() == false) { return; // wait for next update } else { mActiveAction = null; } } // -- activeAction is null or activeAction is done // if no more pending if (HasPendingAction() == false) { MarkAsDone(); } else { PopPendingAction(); } }
protected void UpdateHitAction() { if (onHitAction == null) { return; } if (onHitAction.IsStarted() == false) { return; } if (onHitAction.IsDone()) { return; } onHitAction.Update(mDeltaTime); }