备份脚本

This commit is contained in:
oldpeper 2024-12-20 18:51:07 +08:00
parent 4710954de1
commit b60222c66a
3 changed files with 46 additions and 3 deletions

View File

@ -215,6 +215,16 @@ public static class DataManager
{ {
return GetPrefab("Level"); 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) public static void SaveItemUnLock(int key,bool bo)
{ {
SetPrefab("item-"+key,bo?1:0); SetPrefab("item-"+key,bo?1:0);

View File

@ -30,7 +30,8 @@ public class BattlePanel : MonoBehaviour
[SerializeField] private Button openWeaponry; [SerializeField] private Button openWeaponry;
[SerializeField] private Button openSoldier; [SerializeField] private Button openSoldier;
[SerializeField] private Button startButton; [SerializeField] private Button startButton;
[SerializeField] private int levelID = 0;
#region #region
@ -80,7 +81,17 @@ public class BattlePanel : MonoBehaviour
#endregion #endregion
#region #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() private void OpenCombatPanel()
{ {
readyPanel.SetActive(true); readyPanel.SetActive(true);

View File

@ -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"}} {
"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
}
}