using UnityEngine;
using UnityEngine.UI;
public class Panel_MainUI : UIBase
{
public Panel_MainUI()
{
PrefabsPath = "Prefabs/UI/Panel_MainUI";
}
public override void Start()
{
GetOrAddCommonent
Panel_Setting
using UnityEngine;
using UnityEngine.UI;
public class Panel_Setting : UIBase
{
public Panel_Setting()
{
PrefabsPath = "Prefabs/UI/Panel_Setting";
}
public override void Start()
{
//Debug.Log("我是 Panel_Setting Start 方法");
GetOrAddCommonent("Button_Close").onClick.AddListener(() =>
{
//移除自己
UIManager.Instance.RemoveUI();
});
GetOrAddCommonent("Button_Test").onClick.AddListener(() =>
{
//访问其他的面板的游戏物体
GameObject obj = UIManager.Instance.GetGameObject("Button_Map");
if (obj != null)
obj.transform.Find("Text").GetComponent().text = "Map";
});
GetOrAddCommonent("Button_Test1").onClick.AddListener(() =>
{
Debug.Log("UIManager 中 UI 面板的个数:" + UIManager.Instance.UICount);
});
}
public override void Update()
{
//Debug.Log("我是 Panel_Setting Update 方法");
}
public override void Destroy()
{
//Debug.Log("我是 Panel_Setting Destroy 方法");
}
}
Panel_Affiche
using UnityEngine;
using UnityEngine.UI;
public class Panel_Affiche : UIBase
{
public Panel_Affiche()
{
PrefabsPath = "Prefabs/UI/Panel_Affiche";
}
public override void Start()
{
GetOrAddCommonent("Button_Close").onClick.AddListener(() =>
{
GameManager.Instance.LoadScene("start");
});
}
public override void Update()
{
//Debug.Log("我是 Panel_Affiche Update 方法");
}
public override void Destroy()
{
//Debug.Log("我是 Panel_Affiche Destroy 方法");
}
}
main 场景只挂了一个脚本
MainSceneRoot 脚本同样也是只是用来显示UI用的
using UnityEngine;
public class MainSceneRoot : MonoBehaviour {
void Start () {
UIManager.Instance.ShowUI();
}
}
运行后就能看到,显示了 Panel_MainUI 的UI界面,点击设置,就会打开设置的界面,点击任务按钮,就会跳转到 main 场景(这里只是测试)
现实生活中,有些工作是需要团队中成员依次完成的,这就涉及到了一个顺序问题。现在有T1、T2、T3三个工人,如何保证T2在T1执行完后执行,T3在T2执行完后执行?问题分析:首先问题中有三个实体,T1、T2、T3, 因为是多线程编程,所以都要设计成线程类。关键是怎么保证线程能依次执行完呢?
Java实现过程如下:
public class T1 implements Runnabl
hive在使用having count()是,不支持去重计数
hive (default)> select imei from t_test_phonenum where ds=20150701 group by imei having count(distinct phone_num)>1 limit 10;
FAILED: SemanticExcep
转载源:http://blog.sina.com.cn/s/blog_4f925fc30100rx5l.html
mysql -uroot -p
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@centos var]# service mysql
#mq
xdr.mq.url=tcp://192.168.100.15:61618;
import java.io.IOException;
import java.util.Properties;
public class Test {
String conf = "log4j.properties";
private static final
有一个工程,本来运行是正常的,我想把它移植到另一台PC上,结果报:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.mobovip.bgr/com.mobovip.bgr.MainActivity}: java.lang.ClassNotFoundException: Didn't f
// 报错如下:
$ git pull origin master
fatal: unable to access 'https://git.xxx.com/': SSL certificate problem: unable to get local issuer ce
rtificate
// 原因:
由于git最新版默认使用ssl安全验证,但是我们是使用的git未设