NGUI 点击按钮切换背景

来源:互联网 发布:适合苹果电脑设计软件 编辑:程序博客网 时间:2024/05/18 00:03
using UnityEngine;
using System.Collections;


public class TiaoZhuan : MonoBehaviour
{


    public GameObject TiaoZhuan_3;
    public GameObject TiaoZhuan_2;


    void Start()
    {
        UIEventListener.Get(TiaoZhuan_3).onClick = tiaoZhuan;
    }
    public void tiaoZhuan(GameObject btn)
    {
        this.gameObject.SetActive(false);
        TiaoZhuan_3.SetActive(true);
    }
}
0 0
原创粉丝点击