Ejemplo n.º 1
0
 /// <summary>
 /// Awake is being used to initialize all the reference the class needs,
 /// and to bring it to an initial state.
 /// </summary>
 private void Awake()
 {
     _mode         = TargetFinderMode.NearestEnemy;
     _rangeSquared = range * range;
     InvokeRepeating(nameof(UpdateTarget), 0f, 0.25f);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Changes the mode of the target finder.
 /// </summary>
 /// <param name="mode">new mode of target finder</param>
 public void ChangeMode(TargetFinderMode mode)
 {
     _mode = mode;
 }