コード例 #1
0
ファイル: PathNode.cs プロジェクト: brnpham5/Pet-Game
 // -------------------------------------------------------------------------
 public virtual void OnArriveEvent(PathNodeEvent aEvent)
 {
     if (aEvent != null)
     {
         aEvent.ProcessEvent(gameObject);
     }
 }
コード例 #2
0
        // -------------------------------------------------------------------------
        protected IEnumerator Process(GameObject aGameObject)
        {
            if (mDelayBefore > 0)
            {
                yield return(new WaitForSeconds(mDelayBefore));
            }

            DoProcess(aGameObject);

            if (mDelayAfter > 0)
            {
                yield return(new WaitForSeconds(mDelayAfter));
            }

            if (mNextEvent != null)
            {
                mNextEvent.ProcessEvent(aGameObject);
            }
        }