Ejemplo n.º 1
0
 void IState.Update()
 {
     _contact = _wendy.GetContact();
     if (!_contact)
     {
         _wendy.StartIdleCoroutine(); //플레이어와 멀리 떨어져있을때 움직임
         _start_coroutine = true;
     }
     else //다시 플레이어가 근처였을때 코루틴 정지
     {
         _wendy.StopIdleCoroutine();
         _start_coroutine = false;
     }
 }
Ejemplo n.º 2
0
    void IState.OnEnter(WendyAI wendy)
    {
        //wendy 프로퍼티 초기화
        this._wendy = wendy;

        _state_num       = WendyState.Idle;
        _contact         = _wendy.GetContact();
        _start_coroutine = false;

        _wendy.SetIdleAni();

        if (!_contact)
        {
            _wendy.StartIdleCoroutine();
            _start_coroutine = true;
        }
    }