Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     SheepVisitNumber = VisitSheep.GetComponent <VisitFriend> ().VisitNumber;
     if (SheepVisitNumber >= ExcuteVisitNumber && !IsAlreadyShow && !DialogPanel.activeSelf)
     {
         IsAlreadyShow = true;
         SceneManager.LoadScene("Sheep Event");
         PlayerPrefs.SetString("SheepEvent", IsAlreadyShow.ToString());
         tteok.GetComponent <Item> ().increaseItem();
         PlayerPrefs.SetString("Tteok", "True");
     }
 }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        if (PlayerPrefs.HasKey("SheepEvent"))
        {
            IsAlreadyShow = (PlayerPrefs.GetString("SheepEvent") == "True");
        }
        else
        {
            IsAlreadyShow = false;
        }

        SheepVisitNumber = VisitSheep.GetComponent <VisitFriend> ().VisitNumber;
    }