62 lines
1.6 KiB
C#
62 lines
1.6 KiB
C#
using LitJson;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Unity.VisualScripting;
|
|
using Unity.VisualScripting.Antlr3.Runtime;
|
|
using UnityEngine;
|
|
using static InterfaceManager;
|
|
public class Bootstrap : SingletonMono<Bootstrap>
|
|
{
|
|
public static UIManager UIMgr { get; private set; }
|
|
public EventCenter eventCenter;
|
|
public ScenesManager scenesManager;
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
UIMgr = new UIManager();
|
|
eventCenter = new EventCenter();
|
|
scenesManager = new ScenesManager();
|
|
DontDestroyOnLoad(gameObject);
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
UIMgr.ShowPanel<UI_LoadingPanel>(this, E_UI_Layer.System, (panel) =>
|
|
{
|
|
eventCenter.EventTrigger(Enum_EventType.UpdateProgress, 0.1f);
|
|
scenesManager.LoadSceneAsyn(this, "MainScene", () =>
|
|
{
|
|
Debug.Log("¼ÓÔØ³¡¾°³É¹¦");
|
|
eventCenter.EventTrigger(Enum_EventType.UpdateProgress, 0.9f);
|
|
});
|
|
UIMgr.ShowPanel<UI_BGPanel>(this, E_UI_Layer.Bot, (p) =>
|
|
{
|
|
AudioManager.tipsSource = Camera.main.AddComponent<AudioSource>();
|
|
});
|
|
});
|
|
}
|
|
|
|
|
|
|
|
|
|
private IEnumerator Post()
|
|
{
|
|
Dictionary<string, string> headers = new Dictionary<string, string>();
|
|
WWWForm wWWForm = new WWWForm();
|
|
headers.Add("", "");
|
|
yield return new WaitForSeconds(0.5f);
|
|
StartCoroutine(PostString("", wWWForm, headers, "", data =>
|
|
{
|
|
Debug.Log("Ìá½»½á¹û:" + data);
|
|
}));
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
|
|
}
|