Esempio n. 1
0
 public override void Start()
 {
     base.Start();
     coefCohesion   = 5;
     coefAlineacion = 5;
     coefSeparacion = 5;
     coefLider      = 5f;
     A_ArrayNPC.Add(this);
     bulletPrefab  = GameObject.Find("A_Manager").GetComponent <A_Manager>().bulletPrefab;
     _viewDistance = 7f;
     _viewAngle    = 50f;
     fireRate      = 1;
 }
Esempio n. 2
0
 public override void Start()
 {
     base.Start();
     _sm = new StateMachine();
     _sm.AddState(new A_PursuitState(_sm, this));
     _sm.AddState(new A_ShootState(_sm, this));
     _sm.AddState(new A_FleeState(_sm, this));
     _timerFireRate  = 1.5f;
     fireRate        = 1;
     decisionIndex   = -1;
     distanceToShoot = 7;
     A_ArrayNPC.Add(this);
     if (target)
     {
         nodeNearTarget = CalculateTargetNode(target.transform.position);
     }
     timerReCalculatePathFinding = -1;
 }