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 { 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(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(this, E_UI_Layer.Bot, (p) => { AudioManager.tipsSource = Camera.main.AddComponent(); }); }); } private IEnumerator Post() { Dictionary headers = new Dictionary(); 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() { } }