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);

    }

    }

  • 相关阅读:
    javascript --学习this
    seaJS
    wamp之htaccess的配置
    replace之$1、$2等
    nw.js使用
    新电脑开发环境配置
    vue-vue常用指令
    Array的splice与slice
    vue-入门体验
    Object.defineProperty
  • 原文地址:https://www.cnblogs.com/kuangwu/p/3208252.html
Copyright © 2011-2022 走看看