Ejemplo n.º 1
0
 void Awake()
 {
     unit = GetComponent <FollowWaypoints>();
     if (GameObject.FindGameObjectWithTag("Player").transform)
     {
         hasTarget = true;
         target    = GameObject.FindGameObjectWithTag("Player").transform;
     }
 }
 void Awake()
 {
     boids      = new List <Boid>();
     alignment  = new Alignment();
     cohesion   = new Cohesion();
     separation = new Separation();
     waypoint   = new FollowWaypoints();
     eatFood    = new EatFood();
     flee       = new Flee();
 }
Ejemplo n.º 3
0
 private void Start()
 {
     waypoints = GetComponent <FollowWaypoints>();
     curPoint  = waypoints.curPoint;
 }
Ejemplo n.º 4
0
 public void Register(FollowWaypoints enemy)
 {
     enemies.Add(enemy);
 }