using HJDFrameWork; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; /// /// 功能:框架Root /// 说明: /// namespace Level05 { public class Level05Root : MonoBehaviour { public static Level05Root Instance = null; //初始化顺序:Manager==>各窗口===>>视图Model类==>> private void Awake() { Instance = this; ItemManager itemManager = ItemManager.Instance; itemManager.Init(); ViewManager viewManager = ViewManager.Instance; viewManager.Init(); //初始化其他 AnswerSys answerSys = GetComponent(); answerSys.Init(); } public void TimeTask(float time, Action action) { StartCoroutine(AddTimeTask(time, action)); } IEnumerator AddTimeTask(float time,Action action) { yield return new WaitForSeconds(time); action(); } public void LoadScene(string SceneName) { SceneManager.LoadScene(SceneName); } public void PassSucueed() { //EduCoderTool.WebConnecter.Singleton.SendResultToWeb(true); } } }