void Start() { finalBossController = (FinalBoss)finalBoss.GetComponent("FinalBossController"); gateOpener = (GateOpener)(gameObject.GetComponent("GateOpener")); gatlingWeapon = GameObject.Find("GatlingWeapon"); doubleCannonballWeapon = GameObject.Find("DoubleCannonballWeapon"); }
void Start() { // Set up weapons actualPrimaryWeapon1 = ((PlayerWeapon)primaryWeapon1.GetComponent("PlayerWeapon")); actualPrimaryWeapon2 = ((PlayerWeapon)primaryWeapon2.GetComponent("PlayerWeapon")); actualSecondaryWeapon = ((PlayerWeapon)secondaryWeapon.GetComponent("PlayerWeapon")); // Set up counters primaryFireTimer = 0.0f; secondaryFireTimer = 0.0f; firingPrimary = true; gateOpener = (GateOpener)(gameObject.GetComponent("GateOpener")); gateBulletCollider = (Collider)gateBulletKiller.GetComponent("Collider"); }