示例#1
0
    private void MoveNext()
    {
        if (_folowingMove.IsMoving)
        {
            return;
        }

        MapPosition nextPosition = TryGetNextPosition(_currentPosition);

        if (nextPosition.Equals(_currentPosition))
        {
            StopMove?.Invoke();
            return;
        }

        _currentPosition = nextPosition;
        Vector3 scenePosition = _navigator.ToScenePosition(_currentPosition);

        _folowingMove.Move(scenePosition);

        StartMoveNext?.Invoke();
    }
示例#2
0
 protected void OnStopMove()
 {
     StopMove?.Invoke();
 }