// Start is called before the first frame update void Start() { pourcentile = GetComponent <pourcentage>(); objG = GameObject.Find("Player").GetComponent <ObjectGravity>(); spotlight = GameObject.Find("Player").GetComponentsInChildren <Light>().First(x => x.name == "Spot Light"); cnv = GetComponentsInChildren <Canvas>().First(x => x.name == "EndGame"); cnv.enabled = false; }
// Use this for initialization void Start() { objGrav = GetComponent <ObjectGravity>(); color = gameObject.GetComponent <SpriteRenderer>().color; }