Example #1
0
 private void Start()
 {
     ds        = FindObjectOfType <DroneSpawner>();
     nav.speed = speed;
     // setting speed of enemy
     nav = GetComponent <NavMeshAgent>();
     // accessing the nav mesh agent
     nav.SetDestination(waypoints[currWaypoint].position);
     // sets the destination of the nav mesh agent
     GotoNextPoint();
 }
Example #2
0
 /// <summary>
 /// Sets a reference to the Drone spawner governing its spawning.
 /// Used to notify the spawner when it's destroyed.
 /// </summary>
 /// <param name="spawner">Reference to the scene's DroneSpawner component.</param>
 public void SetMySpawner(DroneSpawner spawner)
 {
     this.spawner = spawner;
 }
Example #3
0
 public void SetMySpawner(DroneSpawner spawner)
 {
     mySpawner = spawner;
 }
Example #4
0
 // Start is called before the first frame update
 void Start()
 {
     ds = FindObjectOfType <DroneSpawner>();
 }