Exemplo n.º 1
0
    void OnCollisionEnter(Collision collision)
    {
        if (collision.collider.CompareTag("Shot") && !done)
        {
            switch (currColorGlow)
            {
            case ColorGlow.Frog:
                balGlo.Green();
                break;

            case ColorGlow.Owl:
                balGlo.Brown();
                break;

            case ColorGlow.Dragonfly:
                balGlo.Purple();
                break;

            case ColorGlow.Hippo:
                balGlo.Aqua();
                break;
            }
            StartCoroutine(DoorDust());

            for (int i = 0; i < doors.Length; i++)
            {
                doorAudS[i].PlayOneShot(audC);
                doorAnim[i].SetBool("Aberto", true);
            }
            done = true;
            Instantiate(activated, new Vector3(transform.position.x, transform.position.y + 2, transform.position.z), activated.transform.rotation);
        }
    }
Exemplo n.º 2
0
    public IEnumerator StartCountdown(float countdownValue = 10)
    {
        switch (currColorGlow)
        {
        case ColorGlow.Frog:
            balGlo.Green();
            break;

        case ColorGlow.Owl:
            balGlo.Brown();
            break;

        case ColorGlow.Dragonfly:
            balGlo.Purple();
            break;

        case ColorGlow.Hippo:
            balGlo.Aqua();
            break;
        }

        glowA.SetTrigger("Glow");
        sparkAS.PlayOneShot(sparkAC);

        currCountdownValue = countdownValue;
        On();
        while (currCountdownValue > 0)
        {
            Debug.Log("Countdown: " + currCountdownValue);
            yield return(new WaitForSeconds(1.0f));

            currCountdownValue--;
        }

        if (currCountdownValue <= 0)
        {
            Off();
            Debug.Log("enum");
        }
    }
Exemplo n.º 3
0
    public IEnumerator StartCountdown(float countdownValue = 10)//inicia temporizador pra manter a(s) porta(s) fechada, troca a cor do Ra (ballgod), toca som
    {
        switch (currColorGlow)
        {
        case ColorGlow.Frog:
            balGlo.Green();
            break;

        case ColorGlow.Owl:
            balGlo.Brown();
            break;

        case ColorGlow.Dragonfly:
            balGlo.Purple();
            break;

        case ColorGlow.Hippo:
            balGlo.Aqua();
            break;
        }

        glowA.SetTrigger("Glow");
        sparkAS.PlayOneShot(sparkAC);

        currCountdownValue = countdownValue;
        On();
        while (currCountdownValue > 0)
        {
            Debug.Log("Countdown: " + currCountdownValue);
            yield return(new WaitForSeconds(1.0f));

            currCountdownValue--;
        }

        if (currCountdownValue <= 0)
        {
            Off();
            Debug.Log("enum");
        }
    }
Exemplo n.º 4
0
    public IEnumerator StartCountdown(float countdownValue = 10)//inicia temporizador pra manter a(s) porta(s) aberta(s), troca a cor do Ra (ballgod), toca som
    {
        switch (currColorGlow)
        {
        case ColorGlow.Frog:
            balGlo.Green();
            break;

        case ColorGlow.Owl:
            balGlo.Brown();
            break;

        case ColorGlow.Dragonfly:
            balGlo.Purple();
            break;

        case ColorGlow.Hippo:
            balGlo.Aqua();
            break;
        }
        StartCoroutine(DoorDust());

        currCountdownValue = countdownValue;
        Off();
        while (currCountdownValue > 0)
        {
            Debug.Log("Countdown: " + currCountdownValue);
            yield return(new WaitForSeconds(1.05f));

            currCountdownValue--;
        }

        if (currCountdownValue <= 0)
        {
            On();
            Debug.Log("enum");
        }
    }
Exemplo n.º 5
0
    public IEnumerator OkCheck()//ativa as particulas, troca a cor do Ra (ballgod), toca som e espera pra desativar as particulas
    {
        ok = false;
        for (int i = 0; i < doors.Length; i++)
        {
            dustParticles[i].SetActive(true);
        }

        switch (currColorGlow)
        {
        case ColorGlow.Frog:
            balGlo.Green();
            break;

        case ColorGlow.Owl:
            balGlo.Brown();
            break;

        case ColorGlow.Dragonfly:
            balGlo.Purple();
            break;

        case ColorGlow.Hippo:
            balGlo.Aqua();
            break;
        }

        glowA.SetTrigger("Glow");
        sparkAS.PlayOneShot(sparkAC);

        yield return(new WaitForSeconds(2f));

        for (int i = 0; i < doors.Length; i++)
        {
            dustParticles[i].SetActive(false);
        }
        ok = true;
    }