//Pre-Initialisation private void Awake() { //Double check that the tag Canister exists and then apply it to this object this.gameObject.tag = "Canister"; system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>(); //None by default as it will be changed later canisterType = FluxType.NONE; //Every canister starts with the charge of Zero || 1 charge = 0; chargeSlider.gameObject.SetActive(false); //Start Colour sliderFill.color = Color.white; // onlyCheckOnce = false; canisterMaterial = GetComponent <Renderer>().materials[1]; //canisterMaterial.SetColor("_canisterColour", Color.red); //canisterMaterial.SetFloat("_canisterLevel", 0.5f); }
//Pre-Initialisation private void Awake() { //Get the system manager system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>(); //Canister slot canisterSlot = currentSystem.SystemCanisterSlot.GetComponent <Canister_Slot>(); }
//Pre-Initialisation private void Awake() { //Grab the base system system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>(); //Canister slot canisterSlot = currentSystem.SystemCanisterSlot.GetComponent <Canister_Slot>(); evm = GameObject.FindGameObjectWithTag("Event_System_Manager").GetComponent <Event_System_Manager>(); oxygenText.text = "Oxygen Systems Offline"; }
private void Start() { system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>(); if (shieldVignette == null || damageVignette == null) { //Debug.Log("No image attached for the vignette flash"); } shieldVignette.SetActive(false); damageVignette.SetActive(false); }
//Main-Initialisation private void Start() { vignetteFlash = GameObject.FindGameObjectWithTag("vFlash").GetComponent <VignetteFlash>(); //Get the rigidBody Component rigidBody = GetComponent <Rigidbody>(); rigidBody.useGravity = false; powerCore = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>(); targetLocationToHit = GameObject.FindGameObjectWithTag("ShipHitLocation"); //FIND OBJECTS BY TAGS? event_Spawner = this.transform.parent.GetComponent <Event_Spawner>(); switch (event_Spawner.currentEventDirection) { case Event_.EventDirection.TOP: shield_System = GameObject.Find("Shield - Top").transform.GetChild(0).GetComponent <Shield_System>(); weapon_System = GameObject.FindGameObjectWithTag("wTOP").GetComponent <Weapon_System>(); //weapon_System = GameObject.Find("Weapon - Top").transform.GetChild(0).GetComponent<Weapon_System>(); //Debug.Log("Found the top Shield component"); break; case Event_.EventDirection.LEFT: shield_System = GameObject.Find("Shield - Left").transform.GetChild(0).GetComponent <Shield_System>(); weapon_System = GameObject.FindGameObjectWithTag("wLEFT").GetComponent <Weapon_System>(); //weapon_System = GameObject.Find("Weapon - Left").transform.GetChild(0).GetComponent<Weapon_System>(); //Debug.Log("Found the left Shield component"); break; case Event_.EventDirection.RIGHT: shield_System = GameObject.Find("Shield - Right").transform.GetChild(0).GetComponent <Shield_System>(); weapon_System = GameObject.FindGameObjectWithTag("wRIGHT").GetComponent <Weapon_System>(); //weapon_System = GameObject.Find("Weapon - Right").transform.GetChild(0).GetComponent<Weapon_System>(); //Debug.Log("Found the right Shield component"); break; case Event_.EventDirection.BOTTOM: shield_System = GameObject.Find("Shield - Bottom").transform.GetChild(0).GetComponent <Shield_System>(); weapon_System = GameObject.FindGameObjectWithTag("wBOTTOM").GetComponent <Weapon_System>(); //weapon_System = GameObject.Find("Weapon - Bottom").transform.GetChild(0).GetComponent<Weapon_System>(); //Debug.Log("Found the bottom Shield component"); break; default: break; } }
//Pre-Initialisation private void Awake() { //Reference to the ship core. //shipCore = GameObject.FindGameObjectWithTag("Power_Core").GetComponent<Power_Core>(); //Get the system manager system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>(); //Canister slot canisterSlot = currentSystem.SystemCanisterSlot.GetComponent <Canister_Slot>(); //Grab the base usage amount usageAmount = system.Shield_UsageAmount; reductionAmount = system.Shield_ReductionAmount; }
//Pre-Initialisation private void Awake() { //Get the system manager system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>(); ////Raycast Line Check - Rework to a sphere cast.? //rayCast = new Ray(transform.position, Vector3.up); //Current systems ray casting object, first child of this system_Ray = this.transform.GetChild(0).GetComponent <System_RayCast>(); //Default value for the currentCanister //currentCanister = null; }
//Pre-Initialisation private void Awake() { //Get a reference to the base system system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>(); //Canister slot canisterSlot = currentSystem.SystemCanisterSlot.GetComponent <Canister_Slot>(); //currentSystem.WireSet.GetComponent<WireStatus>().status; //Material mat = currentSystem.WireSet.transform.GetChild(0).GetComponent<Renderer>().material; //mat.EnableKeyword("_EMISSION"); //Debug.Log("Wire Set " + currentSystem.WireSet.transform.GetChild(0).name + " : " + mat.GetFloat("_EmissionColor")); }
//Pre-Initialisation private void Awake() { //Get a reference to the base system system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>(); //Default check canSpawnCansiter = false; evm = GameObject.FindGameObjectWithTag("Event_System_Manager").GetComponent <Event_System_Manager>(); //get the max canister count if (system != null) { //Starting values canisterCountMax = system.MaxCanisterCount; canisterCountOnScene = system.CurrentCanisterCount; } }
// Use this for initialization void Start() { system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>(); oxygen = GetComponent <Oxygen_System>(); }
//Main-Initialisation private void Start() { baseSystem = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>(); }