public void Play(string stateName) { if (_easyAnimation == null) { return; } _easyAnimation.SetSpeed(_speed); _easyAnimation.Play(stateName, 0); var state = _easyAnimation.GetState(stateName); if (!state.Clip.isLooping) { _playAnimationStateName = stateName; } else { _playAnimationStateName = null; } }
public void OnAction() { _animation.Play(_index, 0.0f); }