void SpawnMark(Vector3 point) { if (_currentMark != null) { Destroy(_currentMark.gameObject); } else { _animator.SetTrigger("StartMoving"); } _currentMark = Instantiate(_markPrefab, point, Quaternion.identity); _currentMark.Init(this); }
public void OnReachedDestination() { _currentMark = null; _animator.SetTrigger("StopMoving"); }