void Awake() { nextFire = 0f; fireInterval = .1f; radarSystem = GetComponentInChildren <RadarSystem>(); missilePool = GetComponentInChildren <MissilePool>(); }
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); }
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>(); }
protected override void Awake() { base.Awake(); animator = GetComponentInChildren <Animator>(); radarSystem = GetComponentInChildren <RadarSystem>(); }