/// ///******************************************************** /// 脚本功能:开始状态 /// 创建人: GD /// 创建时间: 2023/09/20 11:42 ///******************************************************** /// using System.IO; using UnityEngine; using ZXKFramework; namespace DongWuYiXue.Main { public class GamePatternState : StateBase { GameModel gameModel; public override void Init(IFSM stateMachine) { base.Init(stateMachine); gameModel = MVC.GetModel(); //Game.Instance.uiManager.ShowUI(); //#if UNITY_EDITOR //在编辑器模式下 //#else // if (!File.Exists(Path.GetFullPath(Path.Combine(Application.dataPath, @"../../", "encryptedData.txt")))) // { // Game.Instance.uiManager.ShowUI(); // } //#endif } public override void OnEnter(params object[] obj) { base.OnEnter(obj); Game.Instance.uiManager.ShowUI(); Game.Instance.uiManager.ShowUI(); Game.Instance.uiManager.ShowUI(); foreach (MainData mainData in gameModel.excelData.allMainData) { if (mainData.scene == "JingMaiLiuZhiZhen") { gameModel.mainData = mainData; } } } public override void OnExit() { base.OnExit(); Game.Instance.uiManager.CloseUI(); Game.Instance.uiManager.CloseUI(); Game.Instance.uiManager.CloseUI(); } } }