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); }
public void StopAgent() { _currentChainIndex = 0; _currentVoData = null; _currentChainData = null; PinouUtils.Coroutine.StopCoroutine(ref _currentCoroutine); OnAgentStop.Invoke(this); }
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(); }
public Coroutine StartVelocityOverrideChain(Rigidbody rb, Vector3 forward, VelocityOverrideChainData chain) { PinouUtils.Coroutine.RestartCoroutine(StartVelocityOverrideChainCoroutine(rb, forward, chain), ref _currentCoroutine); return(_currentCoroutine); }