public void SetPanelShow(string menuState) { if (C_USE_NEW_UI == false) { return; } mPanelCreateRoom.gameObject.SetActive(false); mPanelEnterRoom.gameObject.SetActive(false); mPanelInGame.gameObject.SetActive(false); mPanelMainMenu.gameObject.SetActive(false); mPanelSelectCar.gameObject.SetActive(false); mPanelSetPlayerName.gameObject.SetActive(false); mPanelSettings.gameObject.SetActive(false); switch (menuState) { // 选择赛车 case "setavatarstyle": { mPanelSelectCar.gameObject.SetActive(true); mPanelSelectCar.OnShow(); break; } // 显示主菜单 case "menublock": { mPanelMainMenu.gameObject.SetActive(true); mPanelMainMenu.OnShow(); break; } // 设置界面 case "setting": { mPanelSettings.gameObject.SetActive(true); mPanelSettings.OnShow(); break; } // 建立比赛房间 case "hostgame": { mPanelCreateRoom.gameObject.SetActive(true); mPanelCreateRoom.OnShow(); break; } // 进入比赛房间 case "findgame": { mPanelEnterRoom.gameObject.SetActive(true); mPanelEnterRoom.OnShow(); //FindGame(); break; } // 设置玩家名称 case "setname": { mPanelSetPlayerName.gameObject.SetActive(true); break; } // 消息出错 case "networkerror": { //MSG_Error(); break; } // 尝试重连 case "tryingtoconnect": { //MSG_TryingToConnect(); break; } case "ingame": { mPanelInGame.gameObject.SetActive(true); break; } // 设置玩家名称 default: //mPanelSetPlayerName.gameObject.SetActive(true); break; } }