コード例 #1
0
    public void closeMenu()
    {
        Time.timeScale = 1;
        saveWindow.SetActive(false);
        PhoneCanvas phone = GameObject.FindGameObjectWithTag("PhoneCanvas").GetComponent <PhoneCanvas>();

        phone.setShow(true);
    }
コード例 #2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetMouseButtonDown(0) && saveWindow.activeSelf == false)
     {
         if (Physics2D.OverlapPoint(Camera.main.ScreenToWorldPoint(Input.mousePosition)) &&
             Physics2D.OverlapPoint(Camera.main.ScreenToWorldPoint(Input.mousePosition)).tag == "Save")
         {
             saveWindow.SetActive(true);
             game.loadTopic();
             Time.timeScale = 0;
             PhoneCanvas phone = GameObject.FindGameObjectWithTag("PhoneCanvas").GetComponent <PhoneCanvas>();
             phone.setShow(false);
         }
     }
 }
コード例 #3
0
 void Update()
 {
     if (system.haveConversation(mapID) && system.getCurrentQuest().QuestID == questID && !system.isAlert)
     {
         if (system.getHaveConversation(mapID) == false && trigger)
         {
             Debug.Log("have conversation ");
             visualnovel.SetActive(true);
             system.setHaveConversation(mapID, true);
         }
     }
     else if (system.getCurrentQuest().QuestID != questID)
     {
         //do nothing
     }
     else
     {
         Destroy(visualnovel);
     }
     if (system.getHaveConversation(mapID) == true && visualnovel.activeSelf == false && haveTutorial)
     {
         PhoneCanvas turtorial = GameObject.FindGameObjectWithTag("PhoneCanvas").GetComponent <PhoneCanvas>();
         turtorial.tutorial.SetActive(true);
         haveTutorial = false;
     }
     if (system.getHaveConversation(mapID) == true && visualnovel.activeSelf == false && finishTutorial == false)
     {
         PhoneCanvas turtorial = GameObject.FindGameObjectWithTag("PhoneCanvas").GetComponent <PhoneCanvas>();
         if (turtorial.tutorial.activeSelf == false)
         {
             finishTutorial = true;
         }
     }
     if (system.getHaveConversation(mapID) == true && visualnovel.activeSelf == false && finishTutorial == true && !isShowQuest)
     {
         system.ShowQuestMessage();
         isShowQuest = true;
     }
 }