コード例 #1
0
ファイル: AIBase.cs プロジェクト: OrangeSniper/TankTankBoom
 protected void CancelCurrentPathRequest()
 {
     waitingForPathCalculation = false;
     // Abort calculation of the current path
     if (seeker != null)
     {
         seeker.CancelCurrentPathRequest();
     }
 }
コード例 #2
0
ファイル: AILerp.cs プロジェクト: blindcrikket/AI_Cherobin
        public void OnDisable()
        {
            if (seeker != null)
            {
                seeker.CancelCurrentPathRequest();
            }
            canSearchAgain = true;

            if (path != null)
            {
                path.Release(this);
            }
            path = null;
            interpolator.SetPath(null);

            seeker.pathCallback -= OnPathComplete;
        }
コード例 #3
0
ファイル: AILerp.cs プロジェクト: wobushiren79/ThaumAge
        /// <summary>
        /// Clears the current path of the agent.
        ///
        /// Usually invoked using <see cref="SetPath(null)"/>
        ///
        /// See: <see cref="SetPath"/>
        /// See: <see cref="isStopped"/>
        /// </summary>
        protected virtual void ClearPath()
        {
            // Abort any calculations in progress
            if (seeker != null)
            {
                seeker.CancelCurrentPathRequest();
            }
            canSearchAgain   = true;
            reachedEndOfPath = false;

            // Release current path so that it can be pooled
            if (path != null)
            {
                path.Release(this);
            }
            path = null;
            interpolator.SetPath(null);
        }
コード例 #4
0
        public void OnDisable()
        {
            // Abort any calculations in progress
            if (seeker != null)
            {
                seeker.CancelCurrentPathRequest();
            }
            canSearchAgain = true;

            // Release current path so that it can be pooled
            if (path != null)
            {
                path.Release(this);
            }
            path = null;
            interpolator.SetPath(null);

            // Make sure we no longer receive callbacks when paths complete
            seeker.pathCallback -= OnPathComplete;
        }