Пример #1
0
 private void SetNextPoint()
 {
     if (currentPath.Count > 1)
     {
         transform.position = currentPath[0];
         currentPath.RemoveAt(0);
         SetDirection();
     }
     else
     {
         GoalReached?.Invoke();
         StopMovement();
     }
 }
Пример #2
0
 private void OnGoalEntered(Checkpoint checkpoint)
 {
     GoalReached?.Invoke();
 }
Пример #3
0
 private void OnGoalReached()
 {
     GoalReached?.Invoke(this, EventArgs.Empty);
 }
Пример #4
0
 protected virtual void OnGoalReached(CounterEvent e)
 {
     GoalReached?.Invoke(this, e);
 }