55 lines
1.4 KiB
C#
55 lines
1.4 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics.Tracing;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class Bootstrap : SingletonMono<Bootstrap>
|
|
{
|
|
public UIManager uiManager;
|
|
public EventCenter eventCenter;
|
|
public ScenesManager scenesManager;
|
|
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
uiManager = new UIManager();
|
|
eventCenter = new EventCenter();
|
|
scenesManager = new ScenesManager();
|
|
DontDestroyOnLoad(gameObject);
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
scenesManager.LoadSceneAsyn(this, "LoginScene", () =>
|
|
{
|
|
Debug.Log("¼ÓÔØ³¡¾°³É¹¦");
|
|
});
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
// if (Input.GetKeyDown("s"))
|
|
// {
|
|
// Debug.Log("Input.GetKeyDown(\"u\")");
|
|
// uiManager.ShowPanel<UI_TestPanel>(this, E_UI_Layer.Bot, (panel) =>
|
|
// {
|
|
// panel.OnInit();
|
|
// Debug.Log("UI_TestPanelÏÔʾ³É¹¦");
|
|
// });
|
|
// }
|
|
//
|
|
// if (Input.GetKeyDown("h"))
|
|
// {
|
|
// Debug.Log("Input.GetKeyDown(\"h\")");
|
|
// uiManager.HidePanel<UI_TestPanel>();
|
|
// }
|
|
//
|
|
// if (Input.GetKeyDown("e"))
|
|
// {
|
|
// Debug.Log("Input.GetKeyDown(\"e\")");
|
|
// eventCenter.EventTrigger(Enum_EventType.TestEvent1);
|
|
// }
|
|
|
|
}
|
|
} |