예제 #1
0
 public Coroutine StartVelocityOverride(Rigidbody rb, Vector3 forward, VelocityOverrideData voData)
 {
     _currentChainIndex = 0;
     _currentChainData  = null;
     PinouUtils.Coroutine.RestartCoroutine(ApplyVelocityOverrideCoroutine(rb, forward, voData, true), ref _currentCoroutine);
     return(_currentCoroutine);
 }
예제 #2
0
 public void StopAgent()
 {
     _currentChainIndex = 0;
     _currentVoData     = null;
     _currentChainData  = null;
     PinouUtils.Coroutine.StopCoroutine(ref _currentCoroutine);
     OnAgentStop.Invoke(this);
 }
예제 #3
0
        private IEnumerator StartVelocityOverrideChainCoroutine(Rigidbody rb, Vector3 forward, VelocityOverrideChainData chain)
        {
            _currentChainIndex = 0;
            _currentChainData  = chain;
            for (; _currentChainIndex < chain.OverrideChain.Length; _currentChainIndex++)
            {
                yield return(ApplyVelocityOverrideCoroutine(rb, forward, chain.OverrideChain[_currentChainIndex]));
            }

            StopAgent();
        }
예제 #4
0
 public Coroutine StartVelocityOverrideChain(Rigidbody rb, Vector3 forward, VelocityOverrideChainData chain)
 {
     PinouUtils.Coroutine.RestartCoroutine(StartVelocityOverrideChainCoroutine(rb, forward, chain), ref _currentCoroutine);
     return(_currentCoroutine);
 }