This commit is contained in:
DESKTOP-SAJ6RKV\Administrator 2025-05-28 22:52:52 +08:00
parent e68fb913dc
commit 32e7b29fec

View File

@ -27,7 +27,6 @@ namespace GameLogic
#region #region
// 两个模式的选择记忆功能补充 // 两个模式的选择记忆功能补充
int gameModelId = -1;
int gameLenTiemrId = -1; int gameLenTiemrId = -1;
private void OnClick_GameStartBtn() private void OnClick_GameStartBtn()
@ -39,21 +38,10 @@ namespace GameLogic
{ {
if (m_rect_GameModel.GetChild(i).GetComponent<Toggle>().isOn) if (m_rect_GameModel.GetChild(i).GetComponent<Toggle>().isOn)
{ {
gameModelId = i; gameLenTiemrId = i;
} }
} }
//for (int i = 0; i < m_rect_GameTimeLen.childCount; i++)
//{
// if (m_rect_GameTimeLen.GetChild(i).GetComponent<Toggle>().isOn)
// {
// gameLenTiemrId = i;
// }
//}
// 设置游戏模式
// EventConts.gameStateType = (GameStateType)gameModelId;
//EventConts.gameStateType = GameStateType.团队赛;
// 设置游戏时长 // 设置游戏时长
switch (gameLenTiemrId) switch (gameLenTiemrId)
{ {
@ -71,9 +59,9 @@ namespace GameLogic
break; break;
} }
//Log.Info("当前选择游戏模式: {0} , 设置游戏时长: {1}", EventConts.gameStateType, EventConts.gameLenTiemr); Log.Info(" 设置游戏时长: {0}", EventConts.gameLenTiemr);
GameModule.Setting.SetInt("gameModelId", gameModelId); //GameModule.Setting.SetInt("gameModelId", gameModelId);
GameModule.Setting.SetInt("gameLenTiemrId", gameLenTiemrId); GameModule.Setting.SetInt("gameLenTiemrId", gameLenTiemrId);
GameModule.Setting.Save(); GameModule.Setting.Save();
@ -99,11 +87,10 @@ namespace GameLogic
base.OnCreate(); base.OnCreate();
// 默认记忆功能(先不推,优先级不高) // 默认记忆功能(先不推,优先级不高)
gameModelId = GameModule.Setting.GetInt("gameModelId"); //gameModelId = GameModule.Setting.GetInt("gameModelId");
gameLenTiemrId = GameModule.Setting.GetInt("gameLenTiemrId"); gameLenTiemrId = GameModule.Setting.GetInt("gameLenTiemrId");
m_rect_GameModel.GetChild(gameModelId).GetComponent<Toggle>().isOn = true; m_rect_GameModel.GetChild(gameLenTiemrId).GetComponent<Toggle>().isOn = true;
//m_rect_GameTimeLen.GetChild(gameLenTiemrId).GetComponent<Toggle>().isOn = true;
// 读取音频设置 // 读取音频设置