void Awake() { //Henter komponentene anim = gameObject.GetComponent <Animator> (); hash = GameObject.Find("gameController").GetComponent <HashIDs> (); fase = GameObject.Find("gameController").GetComponent <FasebytteGraphics> (); }
void Awake() { //Hanter faklene til arrauen basert på taggen "fakkel" fakler = GameObject.FindGameObjectsWithTag("fakkel"); //Henter referansen til fasebytteGraphics fasebytteGraphics = GameObject.Find("gameController").GetComponent <FasebytteGraphics> (); }
//Fyller referanse variablene med inn hold ved oppstart void Awake() { //HEnter komponetntet anmator i objektet skriptet er koblet til anim = GetComponent <Animator> (); //Finner spillobjektet gameCotroller og dens komponent HashIDs hvor HashID skriptet befinner seg hash = GameObject.Find("gameController").GetComponent <HashIDs> (); //Finner spillobjektet gameController for skripetet FasebytteGraphics er koblet til fasebytteGraphics = GameObject.Find("gameController").GetComponent <FasebytteGraphics> (); }
void Awake() { lys = gameObject.GetComponent <Light> (); fasebytteGraphics = GameObject.Find("gameController").GetComponent <FasebytteGraphics> (); lysstyrke = lys.intensity; isDay = fasebytteGraphics.getErDag(); if (!isDay) { lys.intensity = 0f; } }
void Awake() { antallPenger = startpenger; if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } runde = 0; nedteller = 40f; resetNedteller = 40f; fasebyttegraphics = GameObject.Find("gameController").GetComponent <FasebytteGraphics>(); kampfase = GetComponent <Kampfase> (); menuGui = GetComponent <MenuGui> (); faseGUI = GetComponent <FaseGUI> (); }
void Awake() { fasebyttegraphics = GameObject.Find("gameController").GetComponent <FasebytteGraphics> (); audioManager = GameObject.Find("AudioManager").GetComponent <AudioManager> (); }