void Start () { this.imagenDinero = GameObject.Find ("CantidadDinero").GetComponent<Text> (); this.gananciaCortesia = GameObject.Find ("GananciaCortesia").GetComponent<Text> (); this.imgCortesia = GameObject.Find ("BarraHonor").GetComponent<establecerCortesia> (); this.barraCotesia = GameObject.Find ("BarraHonor").GetComponent<Image> (); this.audios = this.gameObject.GetComponents<AudioSource> (); this.audioDinero = this.audios [0]; this.audioCortesia = this.audios [1]; this.imagenDinero.text = VariablesGenerales.Instance.getDineroActual ().ToString(); if (VariablesGenerales.Instance.getDineroActual () >= 50) this.imagenDinero.color = new Color32(0, 66, 6, 255); this.imgCortesia.setImagenCortesia (VariablesGenerales.Instance.getCortesiaActual ()); this.gananciaCortesia.enabled = false; }
void Start() { this.imagenDinero = GameObject.Find("CantidadDinero").GetComponent <Text> (); this.gananciaCortesia = GameObject.Find("GananciaCortesia").GetComponent <Text> (); this.imgCortesia = GameObject.Find("BarraHonor").GetComponent <establecerCortesia> (); this.barraCotesia = GameObject.Find("BarraHonor").GetComponent <Image> (); this.audios = this.gameObject.GetComponents <AudioSource> (); this.audioDinero = this.audios [0]; this.audioCortesia = this.audios [1]; this.imagenDinero.text = VariablesGenerales.Instance.getDineroActual().ToString(); if (VariablesGenerales.Instance.getDineroActual() >= 50) { this.imagenDinero.color = new Color32(0, 66, 6, 255); } this.imgCortesia.setImagenCortesia(VariablesGenerales.Instance.getCortesiaActual()); this.gananciaCortesia.enabled = false; }