// Lo llama el hijo cuando se inicializa public void Start() { ready = true; player = this.transform.GetComponentInParent <PlayerScript>(); nextAction = coolDown; if (button && player.CompareTag("Player")) { image = new List <Image>(button.GetComponentsInChildren <Image>()).Where(i => i.tag == "Cooldown").Single <Image>(); text = new List <Text>(button.GetComponentsInChildren <Text>()).Where(i => i.tag == "Cooldown").Single <Text>(); coolDownAzul(); } if (GameObject.FindGameObjectWithTag("GameController")) { gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>(); } }