示例#1
0
        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;
            }
        }
示例#2
0
 public void OnAction()
 {
     _animation.Play(_index, 0.0f);
 }