Exemplo n.º 1
0
 void Awake()
 {
     nextFire     = 0f;
     fireInterval = .1f;
     radarSystem  = GetComponentInChildren <RadarSystem>();
     missilePool  = GetComponentInChildren <MissilePool>();
 }
Exemplo n.º 2
0
 public override void Init()
 {
     gameObject.layer = layer;
     thruster         = GetComponent <Thruster>();
     thruster.SetThrustV(1f);// Go forward
     _RadarSystem = GameObject.Find("RadarSystem").GetComponent <RadarSystem>();
     _RadarSystem.AddRadarBlip(gameObject, radarColor, 0.5f);
     InitWeapons();
     bounty = Random.Range(bountyLow, bountyHigh);
 }
Exemplo n.º 3
0
 void Awake()
 {
     missileArray = new List <GameObject>();
     poolCount    = 10;
     index        = 0;
     for (int i = 0; i < poolCount; i++)
     {
         missileArray.Add(Instantiate(
                              missilePrefab,
                              transform.position,
                              transform.rotation
                              ));
         missileArray[i].transform.SetParent(transform);
         missileArray[i].SetActive(false);
     }
     radarSystem = transform.parent.GetComponentInChildren <RadarSystem>();
 }
Exemplo n.º 4
0
 protected override void Awake()
 {
     base.Awake();
     animator    = GetComponentInChildren <Animator>();
     radarSystem = GetComponentInChildren <RadarSystem>();
 }