示例#1
0
        public void S_C_UserJoin(CMD_SC_GF_USER_JOIN _userJoin)
        {
            int _chair = (int)_userJoin.gsChair;

            CanonCtrl.Instance.S_C_UserJoin(_chair, (int)_userJoin.gsUserId, _userJoin.gsScore, (int)_userJoin.gsLevel, _userJoin.dwName, (int)_userJoin.gsPropIdShip,
                                            (int)_userJoin.gsPropIdBullet, (int)_userJoin.gsPower, (int)_userJoin.gsPowerMulti);
        }
        private bool DidUserJoin(int wHandleCode, byte[] wByteBuffer, int wDataSize)
        {
            int dataLen = wByteBuffer.Length;

            if (dataLen < wDataSize)
            {
                Debug.LogError("User join in data Error!!");
                return(false);
            }

            CMD_SC_GF_USER_JOIN userJoin = GameConvert.ByteToStruct <CMD_SC_GF_USER_JOIN>(wByteBuffer, wByteBuffer.Length);

            if (onUserJoinEvent != null)
            {
                onUserJoinEvent(userJoin);
            }


            return(true);
        }