public void Start()
    {
        theCollider = gameObject.GetComponent <Collider2D>();

        anim = GameObject.Find("UI").GetComponentInChildren <Animator>();
        fade = GameObject.Find("UI").GetComponentInChildren <fadeScript>();
    }
Exemple #2
0
    IEnumerator secondDelay()
    {
        yield return(new WaitForSeconds(waitForDissolve));

        fadeScript myFadeScript = canvas.GetComponent <fadeScript>();

        myFadeScript.undoFadeMe();
    }
Exemple #3
0
    IEnumerator myDelay()
    {
        yield return(new WaitForSeconds(waitFor));

        fadeScript myFadeScript = canvas.GetComponent <fadeScript>();

        myFadeScript.FadeMe();
    }
Exemple #4
0
    // Update is called once per frame
    void Update()
    {
        fadeScript myFadeScript = canvas.GetComponent <fadeScript>();

        if (myFadeScript.alpha >= 1)
        {
            StopCoroutine("myDelay");
            StartCoroutine("secondDelay");
        }
    }
Exemple #5
0
 void Start()
 {
     instance = this;
 }