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