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