Exemple #1
0
    // Update is called once per frame
    public void setLine(int i)
    {
        switch (i)
        {
        case 0: {
            readyAni.SetTrigger("on");
            Qs.SetActive(true);
            Enter.SetActive(true);
            EQ.SetActive(true);
            on[8] = false;
        } break;

        case 1: {
            readyAni.SetTrigger("on");
            As.SetActive(true);
            Enter.SetActive(true);
            EA.SetActive(true);
            on[8] = false;
        } break;

        case 2: {
            readyAni.SetTrigger("on");
            Zs.SetActive(true);
            Enter.SetActive(true);
            EZ.SetActive(true);
            on[8] = false;
        } break;
        }
    }
Exemple #2
0
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Return))
        {
            if (QS.activeSelf)
            {
                AS.SetActive(true);
                QS.SetActive(false);
                ZS.SetActive(false);

                EA.SetActive(true);
                EQ.SetActive(false);
                EZ.SetActive(false);
            }
            else if (AS.activeSelf)
            {
                ZS.SetActive(true);
                QS.SetActive(false);
                AS.SetActive(false);

                EZ.SetActive(true);
                EQ.SetActive(false);
                EA.SetActive(false);
            }
            else if (ZS.activeSelf)
            {
                QS.SetActive(true);
                AS.SetActive(false);
                ZS.SetActive(false);

                EQ.SetActive(true);
                EA.SetActive(false);
                EZ.SetActive(false);
            }
        }
    }
Exemple #3
0
    public void ImageChange()
    {
        if (Dialog.GetComponent <Dialog> ().LineNumber == 1)
        {
            // fade in
            Fade.GetComponent <Fade>().enabled = true;

            // audio
            Fade.GetComponent <AudioSource>().enabled = false;
            GetComponent <AudioSource> ().enabled     = true;
            croco.SetActive(true);
        }
        else if (Dialog.GetComponent <Dialog> ().LineNumber == 2)
        {
            croco.SetActive(false);
            carrot.SetActive(true);
        }
        else if (Dialog.GetComponent <Dialog> ().LineNumber == 3)
        {
            carrot.SetActive(false);
            cookie.SetActive(true);
        }
        else if (Dialog.GetComponent <Dialog> ().LineNumber == 4)
        {
            cookie.SetActive(false);
            croco.SetActive(true);
        }
        else if (Dialog.GetComponent <Dialog> ().LineNumber == 5)
        {
            cameleon1.SetActive(false);
            cameleon2.SetActive(true);
        }
        else if (Dialog.GetComponent <Dialog> ().LineNumber == 6)
        {
            // cameleon fade out
            cameleon2.GetComponent <Fade>().enabled = true;
        }
        else if (Dialog.GetComponent <Dialog> ().LineNumber == 8)
        {
            croco.SetActive(false);
            carrot.SetActive(true);
        }
        else if (Dialog.GetComponent <Dialog> ().LineNumber == 9)
        {
            carrot.SetActive(false);
            girim.SetActive(true);
        }
        else if (Dialog.GetComponent <Dialog> ().LineNumber == 10)
        {
            girim.SetActive(false);
            croco.SetActive(true);
        }
        else if (Dialog.GetComponent <Dialog> ().LineNumber == 11)
        {
            croco.SetActive(false);
            EQ.SetActive(true);
        }
        else if (Dialog.GetComponent <Dialog> ().LineNumber == 12)
        {
            EQ.SetActive(false);
            croco.SetActive(true);
        }
        else if (Dialog.GetComponent <Dialog> ().LineNumber == 13)
        {
            for (int i = 0; i < button.Length; i++)
            {
                button [i].GetComponent <Button> ().enabled = true;
            }
            Dialog.SetActive(false);
        }
    }