コード例 #1
0
    public void ImageChange()
    {
        if (Dialog.GetComponent <Dialog>().LineNumber == 1)
        {
            player.SetActive(false);
            playersad.SetActive(true);
        }
        else if (Dialog.GetComponent <Dialog>().LineNumber == 8)
        {
            snake1.SetActive(false);
            playersad.SetActive(false);
            snake2.SetActive(true);
        }
        else if (Dialog.GetComponent <Dialog>().LineNumber == 9)
        {
            snake2.SetActive(false);
            snake3.SetActive(true);
        }
        else if (Dialog.GetComponent <Dialog>().LineNumber == 10)
        {
            snake3.SetActive(false);
            snake4.SetActive(true);
        }
        else if (Dialog.GetComponent <Dialog>().LineNumber == 12)
        {
            DialogWindow.SetActive(false);
            if (!IsAlreadyShow)
            {
                Choose.SetActive(true);
            }
            else
            {
                // answer "yes"
                if (SaveAnswer)
                {
                    Dialog_happy.SetActive(true);
                    DialogWindow.SetActive(false);
                }

                // answer "no"
                else
                {
                    Dialog_sad.SetActive(true);
                    DialogWindow.SetActive(false);
                }
            }
        }
    }