protected virtual bool HandleMsgImpl(IS2C_Msg msg, ref bool handled, ref bool breaked) { return(false); }
public bool HandleMessage(IS2C_Msg msg, ref bool handled, ref bool breaked) { if (msg.MessageID == (System.Int32)RecvMsgType.S2C_Hint) { S2C_Hint prompt = msg as S2C_Hint; switch (prompt.mode) { case S2CHintType.Error: { TcpIPNetwork.Inst.UnLockNetMsgScreenLocked(); HandlePromptError(prompt.mode, prompt.Hints); PlatformSDKInterface.LoginSender = false; handled = true; } return(true); case S2CHintType.TV: { handled = true; } return(true); case S2CHintType.Scroll: { OnAddNotice(prompt.Hints); #if SERVER_HOST UIResourceBinder.FindView <RoomListUIView>().OnAddLogMsg(prompt.Hints); #endif handled = true; } return(true); case S2CHintType.System: { OnAddSystemMessage(prompt.Hints); #if SERVER_HOST UIResourceBinder.FindView <RoomListUIView>().OnAddLogMsg(prompt.Hints); #endif handled = true; } return(true); case S2CHintType.Debug: { OnAddDebugText(prompt.Hints); Debug.Log(prompt.Hints); #if SERVER_HOST UIResourceBinder.FindView <RoomListUIView>().OnAddLogMsg(prompt.Hints); #endif handled = true; } return(true); case S2CHintType.Intro: { OnAddIntro(prompt.Hints); Debug.Log(prompt.Hints); #if SERVER_HOST UIResourceBinder.FindView <RoomListUIView>().OnAddLogMsg(prompt.Hints); #endif handled = true; } return(true); } } //if (msg.MessageID == (System.Int32)RecvMsgType.S2C_Login) //{ // if(!HandleLoginedImpl(msg as S2C_Login)) // { // Debug.LogWarning("未处理的消息:" + ((接收消息类型)msg.MessageID).ToString() + ", 当前逻辑:" + this.ToString()); // return false; // } // handled = true; // return true; //} if (!HandleMsgImpl(msg, ref handled, ref breaked)) { Debug.LogWarning("未处理的消息:" + ((RecvMsgType)msg.MessageID).ToString() + ", 当前逻辑:" + this.ToString()); return(false); } return(true); }