Exemplo n.º 1
0
    protected virtual void MoveTo()
    {
        if ((_currentDest - transform.position).magnitude < 0.5f)
        {
            _stateMachine.SetNextState();
            return;
        }

        transform.position = Vector3.Lerp(transform.position, _currentDest, Time.deltaTime * _speed);
    }
Exemplo n.º 2
0
 protected virtual void FindNewTarget()
 {
     _currentTarget = FindTarget(_currentTarget);
     _stateMachine.SetNextState();
 }