diff --git a/Blacksmith/Assets/Script/DataManager.cs b/Blacksmith/Assets/Script/DataManager.cs index 962fa1c1..4ffd5a52 100644 --- a/Blacksmith/Assets/Script/DataManager.cs +++ b/Blacksmith/Assets/Script/DataManager.cs @@ -215,6 +215,16 @@ public static class DataManager { return GetPrefab("Level"); } + + public static void SetLevelLock(int level,bool bo) + { + SaveValue("LevelLock"+level,bo); + } + + public static bool GetLevelLock(int level) + { + return (bool)LoadValue(typeof(string), "LevelLock" + level); + } public static void SaveItemUnLock(int key,bool bo) { SetPrefab("item-"+key,bo?1:0); diff --git a/Blacksmith/Assets/Script/UI/BattlePanel.cs b/Blacksmith/Assets/Script/UI/BattlePanel.cs index 5b17f20b..14b0b7d4 100644 --- a/Blacksmith/Assets/Script/UI/BattlePanel.cs +++ b/Blacksmith/Assets/Script/UI/BattlePanel.cs @@ -30,7 +30,8 @@ public class BattlePanel : MonoBehaviour [SerializeField] private Button openWeaponry; [SerializeField] private Button openSoldier; [SerializeField] private Button startButton; - + [SerializeField] private int levelID = 0; + #region 生命周期 @@ -80,7 +81,17 @@ public class BattlePanel : MonoBehaviour #endregion #region 准备界面 - + + public void OpenLevel() + { + for (int i = 0; i < JsonTab.Instance.tables.Level.DataList.Count; i++) + { + if (DataManager.GetLevelLock(JsonTab.Instance.tables.Level.DataList[i].ID)) + { + levelID = JsonTab.Instance.tables.Level.DataList[i].ID; + } + } + } private void OpenCombatPanel() { readyPanel.SetActive(true); diff --git a/box1/project.config.json b/box1/project.config.json index e122ae3f..3bec14bc 100644 --- a/box1/project.config.json +++ b/box1/project.config.json @@ -1 +1,23 @@ -{"appid":"tt2f5a59e7b06fb35a07","projectname":"box1","unity":{"build":{"webgl":"E:\\Project\\apk\\BoxDY\\webgl_package-20241107_143043.zip","native":{"il2cpp":"E:/Project/apk/BoxDY\\box-All-20241106_135915\\il2cppOutput.zip","apk":"E:/Project/apk/BoxDY\\box-All-20241106_135915\\launcher-release.apk","fullApk":""},"instantGame":""},"publishType":"2","starkSdkVersion":"Without StarkSDK","unityToolsVersion":"4.0.4","unityEngineVersion":"2022.3.44f1c1","arch":"both"}} \ No newline at end of file +{ + "appid": "tt2f5a59e7b06fb35a07", + "projectname": "box1", + "unity": { + "build": { + "webgl": "E:\\Project\\apk\\BoxDY\\webgl_package-20241107_143043.zip", + "native": { + "il2cpp": "E:/Project/apk/BoxDY\\box-All-20241106_135915\\il2cppOutput.zip", + "apk": "E:/Project/apk/BoxDY\\box-All-20241106_135915\\launcher-release.apk", + "fullApk": "" + }, + "instantGame": "" + }, + "publishType": "2", + "starkSdkVersion": "Without StarkSDK", + "unityToolsVersion": "4.0.4", + "unityEngineVersion": "2022.3.44f1c1", + "arch": "both" + }, + "setting": { + "urlCheck": true + } +} \ No newline at end of file