Пример #1
0
    void SpawnMark(Vector3 point)
    {
        if (_currentMark != null)
        {
            Destroy(_currentMark.gameObject);
        }
        else
        {
            _animator.SetTrigger("StartMoving");
        }

        _currentMark = Instantiate(_markPrefab, point, Quaternion.identity);
        _currentMark.Init(this);
    }
Пример #2
0
 public void OnReachedDestination()
 {
     _currentMark = null;
     _animator.SetTrigger("StopMoving");
 }