Exemplo n.º 1
0
    public void Start()
    {
        BagisOpen = false;
        //tutup semua item yg blm dapet
        Wyg.SetActive(false);
        Kriz.SetActive(false);
        Btq.SetActive(false);
        kbg1.SetActive(false);
        kbg2.SetActive(false);
        kbg3.SetActive(false);
        kbg4.SetActive(false);
        kbg5.SetActive(false);
        kbg6.SetActive(false);
        kbg7.SetActive(false);

        AlreadyOpen = false;
    }
Exemplo n.º 2
0
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            WindPop.SetActive(false);
            AlreadyOpen = false;
        }
        if (Input.GetKeyDown(KeyCode.Tab))
        {
            if (BagisOpen)
            {
                tutupbag();
                BagisOpen = false;
            }
            else
            {
                BagisOpen = true;
                bukabag();
            }
        }

        //item
        Wayang = PlayerPrefs.GetInt("Wayang");
        Keris  = PlayerPrefs.GetInt("Keris");
        Batik  = PlayerPrefs.GetInt("Batik");
        //bunga
        Kmbang1 = PlayerPrefs.GetInt("Kembang1Bag");
        Kmbang2 = PlayerPrefs.GetInt("Kembang2Bag");
        Kmbang3 = PlayerPrefs.GetInt("Kembang3Bag");
        Kmbang4 = PlayerPrefs.GetInt("Kembang4Bag");
        Kmbang5 = PlayerPrefs.GetInt("Kembang5Bag");
        Kmbang6 = PlayerPrefs.GetInt("Kembang6Bag");
        Kmbang7 = PlayerPrefs.GetInt("Kembang7Bag");

        if (Wayang == 1)
        {
            Wyg.SetActive(true);
        }
        if (Keris == 1)
        {
            Kriz.SetActive(true);
        }
        if (Batik == 1)
        {
            Btq.SetActive(true);
        }
        if (Kmbang1 == 1)
        {
            kbg1.SetActive(true);
        }
        if (Kmbang2 == 1)
        {
            kbg2.SetActive(true);
        }
        if (Kmbang3 == 1)
        {
            kbg3.SetActive(true);
        }
        if (Kmbang4 == 1)
        {
            kbg4.SetActive(true);
        }
        if (Kmbang5 == 1)
        {
            kbg5.SetActive(true);
        }
        if (Kmbang6 == 1)
        {
            kbg6.SetActive(true);
        }
        if (Kmbang7 == 1)
        {
            kbg7.SetActive(true);
        }
    }