Beispiel #1
0
    //
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyUp(KeyCode.Q))
        {
            whereSpawn.story_n = whereSpawn.story_n + 1;
        }


        time = Time.time;

        if (msgSys.IsCompleted == false)  //如果開始對話,對話框會出現
        {
            player.canmove = false;
            fade_P         = false;
            panel.SetActive(true); //
            //  if (iswho == "NPC_mom" || iswho == "NPC_flower")
            if (NPC.NPC_YN == true)
            {
                Player_2D.SetActive(true);
                nametext.SetActive(true);
                if (NPC.NPC_big_YN == true)
                {
                    NPC_2D_big.SetActive(true);
                    NPC_2D.SetActive(false);
                }
                if (NPC.NPC_big_YN == false)
                {
                    NPC_2D_big.SetActive(false);
                    NPC_2D.SetActive(true);
                }
            }
            else
            {
                Player_2D.SetActive(false);
                NPC_2D.SetActive(false);
                NPC_2D_big.SetActive(false);
                nametext.SetActive(false);
                NPC_2D_big.SetActive(false);
            }
        }


        if (msgSys.IsCompleted == true)  //完成對話
        {
            if (Input.GetKeyUp(KeyCode.Z))
            {
                fade_P           = true;
                player.canmove   = true;
                msgSys.msgText   = "";
                msgSys.talkstart = false;
                // DialogueHolder_NPC.log_optionrecord=null;
            }
        }
    }