Unity客户端架构-UIContainer
来源:互联网 发布:天猫优质男装品牌知乎 编辑:程序博客网 时间:2024/05/17 04:56
using UnityEngine;using System.Collections;using System.Collections.Generic;//UI容器public class UIContainer : MonoBehaviour { public GameObject loginPanel; public GameObject mainPanel; public GameObject fightPanel; public GameObject duplicatePanel; public GameObject WorldPanel; public GameObject taskPanel; public List<GameObject> panels = new List<GameObject>(); public List<GameObject> AllPanel { get { this.panels.Clear(); this.AddPanel(this.loginPanel); this.AddPanel(this.mainPanel); this.AddPanel(this.fightPanel); this.AddPanel(this.duplicatePanel); this.AddPanel(this.WorldPanel); this.AddPanel(this.taskPanel); return this.panels; } } private void AddPanel(GameObject go) { if (go != null) { this.panels.Add(go); } } public void ClearAll() { List<GameObject> all = AllPanel; foreach (GameObject obj in all) { if (obj != null) DestroyImmediate(obj, true); } panels.Clear(); } public static UIContainer instance; // Use this for initialization void Start () { UnityEngine.Object.DontDestroyOnLoad(base.gameObject); instance = this; }}
0 0
- Unity客户端架构-UIContainer
- Unity客户端架构-Util
- Unity客户端架构-io
- Unity客户端架构-Resource
- Unity客户端架构-PanelManager
- Unity客户端架构-DialogManager
- Unity客户端架构-BaseDialog
- Unity客户端架构-DialogInfo
- Unity客户端架构-DialogType
- Unity客户端架构-GlobalGenerator
- Unity客户端架构设计视频教程
- Unity游戏开发Photon Server之客户端架构
- DuiLib 之 UIContainer
- unity客户端
- Unity架构??
- 客户端架构
- 客户端架构
- Unity 网游客户端Dome
- MinGW配置pthread环境(转)
- git - git 命令使用笔记
- 超大01背包(hdu 5887)
- [Leetcode] Valid Parentheses
- Makefile中origin函数
- Unity客户端架构-UIContainer
- [Android]Activity启动过程
- 面向对象程序设计上机练习九(对象指针)
- 有刷、有感和无刷无感电机的使用心得
- 不依赖storyboard实现ViewController跳转和传参
- 微信native扫码支付
- 一、安卓预备知识
- 网站上传文件学习笔记
- 字符流中第一个不重复的字符