public static bool ShowTimer(List <string> paramList) { if (paramList == null || paramList.Count < 1 || paramList.Count > 2) { return(false); } GameScene scene = SceneManager.Instance.GetCurScene() as GameScene; if (scene == null) { return(false); } if (paramList.Count == 2) { scene.ResetLogicRunTime(); SceneManager.Instance.SetCountDown(int.Parse(paramList[1])); } BattleUIModule module = ModuleManager.Instance.FindModule <BattleUIModule>(); module.ShowTimer(System.Convert.ToBoolean(paramList[0])); return(true); }
public static bool ShowProgress(List <string> paramList) { if (paramList == null || paramList.Count != 3) { return(false); } BattleUIModule module = ModuleManager.Instance.FindModule <BattleUIModule>(); module.ShowProgress(int.Parse(paramList[0]), paramList[1], float.Parse(paramList[2])); return(true); }
IEnumerator LoadBattleScene() { yield return(0); var back = SceneManager.LoadSceneAsync("Battlefield"); while (!back.isDone) { yield return(0); } _battleLogicObject.onupdate += Update; //----------------- //----------------- // UIModule.getInstance.ClearAll(); var battleInputModule = ModuleManager.getInstance.GetModule <BattlefieldInputModule>(); if (battleInputModule != null) { battleInputModule.Rest(); } LevelManager.getInstance.SetCurrentLevel(0, 0); ModuleManager.getInstance.StartModule <BattlefieldCameraModule>(); ModuleManager.getInstance.StartModule <BattlefieldInputModule>(); //UI mode 启动前置! ModuleManager.getInstance.StartModule <BattleUIModule>("Guide"); ModuleManager.getInstance.StartModule <BattleTurnsModule>(); //此处载入关卡数据mapdata ModuleManager.getInstance.StartModule <GuideModule>(); //ModuleManager.getInstance.StartModule<RobotManagerModule>(); ModuleManager.getInstance.StartModule <BattleControllerModule>(); _battleUIModule = ModuleManager.getInstance.GetModule <BattleUIModule>(); _battleInputModule = ModuleManager.getInstance.GetModule <BattlefieldInputModule>(); //_robotManagerModule = ModuleManager.getInstance.GetModule<RobotManagerModule>(); _battleTurnsModule = ModuleManager.getInstance.GetModule <BattleTurnsModule>(); //这里尝试载入一下道具 //SaveLoader.getInstance.LoadPlayerCurItems(area); //加上mission回调 MissionManager.getInstance.OnMissionValueHandler += OnMissionValue; _battleTurnsModule.NextTurn(); }