// Use this for initialization void Start() { text = GetComponent <Text>(); Game game = FindObjectOfType <Game>(); if (type == ScoreChangeType.Points) { game.IncreasePoints.AddListener(Activate); } else { game.IncreaseTime.AddListener(ActivateTime); } anim = GetComponent <AnimatedUI>(); }
private IEnumerator WaitForClose(AnimatedUI anim, float time) { yield return(new WaitForSeconds(time)); anim.Exit(); }
private IEnumerator WaitForOpen(AnimatedUI anim, float time) { yield return(new WaitForSeconds(time)); anim.Play(); }