zoukankan      html  css  js  c++  java
  • Unity3d 多次显示关闭一个UI

    publicclass OpenClooseGoUI : MonoBehaviour {

    public  GameObject   closeBt;

    public  GameObject   goUI;

    public  GameObject   openBt;

    void Start () {

    if(closeBt)

    UIEventListener.Get(closeBt).onPress += closeList;

    if(openBt)

    UIEventListener.Get(openBt).onPress += openList;

    }

    void closeList(GameObject go, bool istrue) {

           if (istrue)

      return;

    openCloose(false);

        }

    internal  void  openCloose(bool isbool){

     

    opencloosegoUI(isbool);

     

    }

    void openList(GameObject go, bool istrue) {

            if (istrue)

      return;

    openCloose(true);

        }

     

    void opencloosegoUI(bool  isbool)

    {

      if(goUI && goUI.active!=isbool)

    goUI.SetActiveRecursively(isbool);

    }

    }

  • 相关阅读:
    单例模式
    js事件
    oracle_to_excel
    jquery_2
    jquery_1
    4.linux 复制,删除,重命名
    一个tomcat下部署多个springboot项目
    3.centos7 安装oracle
    桥接模式
    组合模式
  • 原文地址:https://www.cnblogs.com/kuangwu/p/3208252.html
Copyright © 2011-2022 走看看