//结算消息是广播的,(别人结算的信息也会收到) public void S_C_Balance(CMD_SC_BALANCE _balance) { int _chair = (int)_balance.gsChair; if (CanonCtrl.Instance.singleCanonList[_chair] != null) { // CanonCtrl.Instance.S_C_AccountMsgHaveReceive = true;(真实玩家才改变) BuyScoreAndAccount.Instance.S_C_Account_NoPanel((int)_balance.gsGold, _chair); } }
private bool DidBalance(int wHandleCode, byte[] wByteBuffer, int wDataSize) { int dataLen = wByteBuffer.Length; if (dataLen < wDataSize) { Debug.LogError("User join in data Error!!"); return(false); } CMD_SC_BALANCE balance = GameConvert.ByteToStruct <CMD_SC_BALANCE>(wByteBuffer, wByteBuffer.Length); if (onBalanceEvent != null) { onBalanceEvent(balance); } return(true); }