/// void Awake() // INITIALIZE VARIABLES { bluePlayer = GameObject.FindGameObjectWithTag("Blue_Player").GetComponent <BluePlayerController>(); blueGun = GameObject.FindGameObjectWithTag("Blue_Gun").GetComponent <BlueGunController>(); instance = this.gameObject; warpColor = warpLight.color; }
//====================================== void OnEnable() { // Player Controller bluePlayerController = GetComponent <BluePlayerController>(); bluePlayerController.canShoot = false; // Disable Firing Script // Gun Controller blueGunController = GameObject.FindGameObjectWithTag("Blue_Gun").GetComponent <BlueGunController>(); blueGunController.isFiringLaser = false; // Move Player myRigidbody = GetComponent <Rigidbody>(); myRigidbody.velocity = Vector3.zero; // Stop Movement // Disable Firing GetComponent <BlueFiringPrimary>().enabled = false; }
/// void Awake() // INITIALIZE VARIABLES { blueGun = GameObject.FindGameObjectWithTag("Blue_Gun").GetComponent <BlueGunController>(); bluePlayer = GameObject.FindGameObjectWithTag("Blue_Player").GetComponent <BluePlayerController>(); }
void Start() { blueAltFire = FindObjectOfType <BlueGunController>(); image = GetComponent <Image>(); }
void Start() { blueBattery1 = FindObjectOfType <BlueGunController>(); image = GetComponent <Image>(); }