---
# System prepended metadata

title: APP期中介面展示

---

# APP期中介面展示


* ### Figma 介面
![](https://i.imgur.com/lxqFRcR.png)
  ### Figma 介面流程圖
![](https://i.imgur.com/MLvz33h.png)


* ### Unit APP介面製作畫面
![](https://i.imgur.com/xSEjite.png)


* ### Unity APP介面程式
```csharp=
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class L1Mgr : MonoBehaviour
{
   
    public Button btnOpen;
    public Button btnOpen2;
    public Button btnOpen2_3;
    public Button btnOpen3;
    public Button btnOpen4;
    public Button btnOpen5;
    public MsgHandler msgHandler2;
    public MsgHandler msgHandler3;
    public MsgHandler msgHandler4;    
    public MsgHandler msgHandler5;

    // Start is called before the first frame update
    void Start()
    {
       //msgHandler.gameObject.SetActive(false);
        btnOpen.onClick.AddListener(onbtnOpenClick);
        btnOpen2.onClick.AddListener(onbtnOpen2Click);
        btnOpen2_3.onClick.AddListener(onbtnOpen2_3Click);
        btnOpen3.onClick.AddListener(onbtnOpen3Click);
        btnOpen4.onClick.AddListener(onbtnOpen4Click);
        btnOpen5.onClick.AddListener(onbtnOpen5Click);
    }

    // Update is called once per frame
    public void onbtnOpenClick(){

    msgHandler2.Show("選擇房型", "請特別注意!");
      
    }

    public void onbtnOpen2Click()
    {

        msgHandler3.Show("房間", "請特別注意!");

    }

    public void onbtnOpen2_3Click()
    {

        msgHandler3.Show("房間", "請特別注意!");

    }
    public void onbtnOpen3Click()
    {

        msgHandler4.Show;

    }
    public void onbtnOpen4Click()
    {

        msgHandler5.Show;

    }

    public void onbtnOpen5Click()
    {
        msgHandler4.gameObject.SetActive(false);
        msgHandler5.gameObject.SetActive(false);

    }

}

```
```csharp=
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class MsgHandler : MonoBehaviour
{
    public Button btnClose;
    public Text txtTitle;
    public Text txtContent;

    // Start is called before the first frame update
    void Start()
    {
        btnClose.onClick.AddListener(OnBtnCloseClick);
    }
    /// <summary>
    ///  打開介面
    /// </summary>
    public void Show(string title, string Content)
    {
        this.gameObject.SetActive(true);
        txtTitle.text = title;
        txtContent.text = Content;
    }

    public void OnBtnCloseClick()
    {
        Debug.Log("成功了!");
        this.gameObject.SetActive(false);
    }
   
}

```

![](https://s19.aconvert.com/convert/p3r68-cdx67/3nc7p-bprco.gif)


### 謝謝老師的閱讀！有時間的話再來繼續完成遊戲的遊玩內容~


