public void Deactivate() { if (!IsActive) { return; } if (_process != null) { CoroutineHelper.Instance.StopCoroutine(_process); _process = null; } IsActive = false; OnStateFinished.SafeRaise(this); }
/// <summary> /// End the current state and go to the next one /// </summary> /// <param name="nextState">Next state</param> protected void Finish(string nextState) { OnStateFinished?.Invoke(nextState); }