Example #1
0
 // Use this for initialization
 void Start()
 {
     waypoint           = FindObjectOfType <WayPointsScript>();
     moveDir            = Vector3.zero;
     transform.position = waypoint.StartPosition();
     player             = GameObject.FindGameObjectWithTag("Player").gameObject.transform;
 }
Example #2
0
 /// <summary>
 /// Sets the module.
 /// </summary>
 /// <param name="spawnP">Spawn p.</param>
 /// <param name="wayP">Way p.</param>
 public void SetModule(Transform spawnP, WayPointsScript wayP)
 {
     spawnPoint [moduleIndex] = spawnP;
     wayPoints [moduleIndex]  = wayP;
     moduleIndex++;
 }
Example #3
0
 //WaveSpawner will use this to set the waypoint
 public void SetWayPoints(WayPointsScript wayP)
 {
     wayPoints = wayP;
 }
Example #4
0
 private void Awake()
 {
     spawnPoint = GetComponentInChildren <SpawnPointScript> ().transform;
     wayPoints  = GetComponentInChildren <WayPointsScript> ();
 }