首页 > 代码库 > 二级弹框代码

二级弹框代码

using UnityEngine;using System.Collections;/// <summary>/// Pop button./// </summary>public class BtnBop : MonoBehaviour {    //设置对话框    public GameObject mSettingDlg;    public POP_DLG_TYPE mCurDlgType=POP_DLG_TYPE.DLG_NONE;    //4 pop up button    //private GameObject[] mBtnObj = new GameObject[4];     public enum POP_DLG_TYPE
{ DLG_SETTING,
//设置对话框 DLG_TIP, //提示框 DLG_NONE //未弹出任何对话框 } void Awake() { GameObject grid = GameObject.Find ("ControlSimpleButton4"); UIEventListener.Get(grid).onClick = OnClickBtn; mSettingDlg.SetActive (false); } void Start () { } void Update () { } void OnClickBtn(GameObject go) {
switch(go.name) { case "ControlSimpleButton4": mSettingDlg.SetActive (true); break; } }}

 

二级弹框代码