Пример #1
0
    public void nextdialog()
    {
        index++;

        if (index == 1)
        {
            sentences1();
        }
        if (index == 2)
        {
            sentences2();
        }
        if (index == 3)
        {
            sentences3();
        }
        if (index == 4)
        {
            sentences4();
        }
        if (index == 5)
        {
            sentences5();
        }
        if (index == 6)
        {
            sentences6();
        }
        if (index == 7)
        {
            sentences7();
        }
        if (index == 8)
        {
            sentences8();
        }
        if (index == 9)
        {
            sentences9();
        }

        if (index == 10)
        {
            PlayerPrefs.SetInt("Kembang5Bag", 1);
            PlayerPrefs.SetInt("Keris", 1);
            dialog.SetActive(false);
            FindObjectOfType <AudioManager>().Play("Pop");
            UIbunga5.SetActive(true);
            UIKeris.SetActive(true);

            Instantiate(pohon, new Vector3(target.position.x, target.position.y, 0), Quaternion.identity);
        }
    }
Пример #2
0
 private void Update()
 {
     if (enter)
     {
         if (Input.GetKeyDown(KeyCode.E))
         {
             nextdialog();
         }
     }
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         Hitung++;
         if (Hitung == 1)
         {
             UIKeris.SetActive(false);
         }
         if (Hitung == 2)
         {
             UIbunga5.SetActive(false);
         }
     }
 }