예제 #1
0
    IEnumerator MonsterCheckFSMCoroutine()
    {
        while (_state != CAnimation.STATE.DIE)
        {
            if (_attack._attackTarget == null)
            {
                _state = CAnimation.STATE.IDLE;
                yield return(null);

                continue;
            }

            float dist = _attack.GetAttackTargetDistance();
            if (dist <= _attackDist)
            {
                _state = CAnimation.STATE.ATTACK;
            }
            else if (dist <= _traceDist)
            {
                _state = CAnimation.STATE.WALK;
            }
            else
            {
                _state = CAnimation.STATE.IDLE;
            }
            yield return(null);
        }
    }
예제 #2
0
 public void PlayStateAnimation(CAnimation.STATE state)
 {
     _animation.PlayAnimation(state);
 }