Exemple #1
0
        public void Deactivate()
        {
            if (!IsActive)
            {
                return;
            }
            if (_process != null)
            {
                CoroutineHelper.Instance.StopCoroutine(_process);
                _process = null;
            }

            IsActive = false;
            OnStateFinished.SafeRaise(this);
        }
Exemple #2
0
 /// <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);
 }