private void CreatFavorabilityMain() { if (_favorabilityMainPanel == null) { _favorabilityMainPanel = new FavorabilityMainPanel(); _favorabilityMainPanel.Init(this); } _favorabilityMainPanel.Show(0); }
public override void OnMessage(Message message) { string name = message.Name; object[] body = message.Params; switch (name) { // case MessageConst.CMD_FAVORABILITY_SHOW_MAIN: //显示主界面 // _favorabilityMainPanel.Show(0); // break; case MessageConst.CMD_FACORABLILITY_COMETOMAIN: //这里要进入好感度主界面 GlobalData.FavorabilityMainModel.CurrentRoleVo = (UserFavorabilityVo)body[0]; if (_favorabilityMainPanel == null) { _favorabilityMainPanel = new FavorabilityMainPanel(); _favorabilityMainPanel.Init(this); } _favorabilityMainPanel.Show(0); break; case MessageConst.CMD_FACORABLILITY_BACKTOFAVORABILITY: _favorabilityMainPanel.Hide(); _favorabilityEnternPanel?.Show(0); break; // case MessageConst.TO_GUIDE_FAVORABILITY_PHONE_EVENT_OVER: // _favorabilityEnternPanel.OnBackClick(); // break; case MessageConst.MODULE_FACORABLILITY_ON_SHOW_NPC_INFO: _favorabilityNpcInfoPanel = new FavorabilityNpcInfoPanel(); _favorabilityNpcInfoPanel.Init(this); _favorabilityNpcInfoPanel.Show(0); break; case MessageConst.CMD_FACORABLILITY_ENTER_SEND_GIVE_GIFTS: GameObject go = (GameObject)body[0]; bool isJump = (bool)body[1]; _favorabilityGiftPanel = new FavorabilityGiftPanel(); _favorabilityGiftPanel.IsJump = isJump; _favorabilityGiftPanel.Init(this); _favorabilityGiftPanel.Show(0); _favorabilityGiftPanel.StarCreate(go.transform); break; case MessageConst.CMD_FACORABLILITY_DESTROY_PANEL: string panelName = (string)body[0]; if (panelName == "SendGift") { _favorabilityGiftPanel?.Destroy(); } else if (panelName == "NpcInfo") { _favorabilityNpcInfoPanel?.Destroy(); } _favorabilityMainPanel.OnShowMainBtn(); _favorabilityMainPanel.ShowBackBtn(); break; case MessageConst.CMD_FACORABLILITY_GOBACK: ModuleManager.Instance.GoBack(); break; } }