Ejemplo n.º 1
0
    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();
        }
    }
Ejemplo n.º 2
0
 protected void UpdateHitAction()
 {
     if (onHitAction == null)
     {
         return;
     }
     if (onHitAction.IsStarted() == false)
     {
         return;
     }
     if (onHitAction.IsDone())
     {
         return;
     }
     onHitAction.Update(mDeltaTime);
 }