Beispiel #1
0
    public void parseTile()
    {
        if (mParsed)
        {
            return;
        }
        Serializer serializer = new Serializer(mTileBuffer);

        serializer.read(ref mBngImgIdx);
        serializer.read(ref mMidImgIdx);
        serializer.read(ref mObjImgIdx);
        serializer.read(ref mDoorIdx);
        serializer.read(ref mDoorOffset);
        serializer.read(ref mAniFrame);
        serializer.read(ref mAniTick);
        serializer.read(ref mObjFileIdx);
        serializer.read(ref mLight);

        mHasBng = BinaryUtility.getHightestBit(mBngImgIdx) == 1;
        BinaryUtility.setHighestBit(ref mBngImgIdx, 0);
        mHasMid = BinaryUtility.getHightestBit(mMidImgIdx) == 1;
        BinaryUtility.setHighestBit(ref mMidImgIdx, 0);
        mHasObj = BinaryUtility.getHightestBit(mObjImgIdx) == 1;
        BinaryUtility.setHighestBit(ref mObjImgIdx, 0);
        mCanWalk  = (!mHasBng && !mHasObj && mObjImgIdx > 0);
        mCanFly   = !mHasObj;
        mDoorOpen = BinaryUtility.getHightestBit(mDoorOffset) == 1;
        mHasDoor  = BinaryUtility.getHightestBit(mDoorIdx) == 1;
        mHasAni   = BinaryUtility.getHightestBit(mAniFrame) == 1;
        BinaryUtility.setHighestBit(ref mAniFrame, 0);
    }
Beispiel #2
0
 public virtual void start()
 {
     mPauseFrame          = false;
     instance             = this;
     mGameFrameObject     = this.transform.gameObject;
     mApplicationConfig   = new ApplicationConfig();
     mResourceManager     = new ResourceManager();
     mBinaryUtility       = new BinaryUtility();
     mFileUtility         = new FileUtility();
     mMathUtility         = new MathUtility();
     mStringUtility       = new StringUtility();
     mUnityUtility        = new UnityUtility();
     mPluginUtility       = new PluginUtility();
     mCommandSystem       = new CommandSystem();
     mLayoutManager       = new GameLayoutManager();
     mAudioManager        = new AudioManager();
     mGameSceneManager    = new GameSceneManager();
     mCharacterManager    = new CharacterManager();
     mKeyFrameManager     = new KeyFrameManager();
     mGlobalTouchSystem   = new GlobalTouchSystem();
     mDllImportExtern     = new DllImportExtern();
     mShaderManager       = new ShaderManager();
     mDataBase            = new DataBase();
     mCameraManager       = new CameraManager();
     mLayoutPrefabManager = new LayoutPrefabManager();
     mFrameConfig         = new FrameConfig();
 }
Beispiel #3
0
    public override void execute()
    {
        string name = BinaryUtility.bytesToString(mName.mValue, Encoding.UTF8);

        UnityUtility.logInfo("获得玩家数据 : " + mPlayerGUID + ", 名字 : " + name);
        // 创建该玩家的实例
        CommandCharacterManagerCreateCharacter cmdCreate = newCmd(out cmdCreate);

        cmdCreate.mName          = name;
        cmdCreate.mID            = mPlayerGUID.mValue;
        cmdCreate.mCharacterType = CHARACTER_TYPE.CT_OTHER;
        pushCommand(cmdCreate, mCharacterManager);
        CharacterOther other = mCharacterManager.getCharacter(mPlayerGUID.mValue) as CharacterOther;
        CharacterData  data  = other.getCharacterData();

        data.mMoney          = mMoney.mValue;
        data.mHead           = mHead.mValue;
        data.mServerPosition = (PLAYER_POSITION)mPosition.mValue;
        data.mBanker         = mBanker.mValue;
        data.mReady          = mReady.mValue;
        // 将该玩家加入房间
        GameScene       gameScene = mGameSceneManager.getCurScene();
        CommandRoomJoin cmd       = newCmd(out cmd);

        cmd.mCharacter = other;
        pushCommand(cmd, (gameScene as MahjongScene).getRoom());
    }
Beispiel #4
0
    public override void execute()
    {
        // 只有在主场景中才能接收速度消息
        GameScene gameScene = mGameSceneManager.getCurScene();

        if (gameScene.getSceneType() != GAME_SCENE_TYPE.GST_MAIN)
        {
            return;
        }
        if ((mData[0] == (byte)0xFE && mData[11] == (byte)0xFF))
        {
            // 检查校验位 【1 - 7】中1的个数之和等于第10位
            int sum = 0;
            for (int i = 1; i < 8; ++i)
            {
                sum += BinaryUtility.crc_check(mData[i]);
            }
            // 校验正确
            if (sum == mData[10])
            {
                // [0]	  [1]		  [2] [3][4]	[5][6]	  [7]   [8]		    [9]			[10]		[11]
                // FE	  00(包类型)  00   功率		速度	   00   FF      机器号[0-19]		crc		     FF

                // 5-6 速度标识
                // 3-4使用功率来作为速度(不使用5-6的速度值)
                int speed = mData[6] * 256 + mData[5];
                speed = speed > 600 ? 600 : speed;
            }
        }
    }
Beispiel #5
0
    public override void init(ComponentOwner owner)
    {
        base.init(owner);
        // 通知子类设置自己的音效类型
        setSoundOwner();
        // 如果音效还未加载,则加载所有音效,此处只是注册
        if (mAudioTypeMap.Count == 0)
        {
            int dataCount = mDataBase.getDataCount(DATA_TYPE.DT_GAME_SOUND);
            for (int i = 0; i < dataCount; ++i)
            {
                DataGameSound soundData = mDataBase.queryData(DATA_TYPE.DT_GAME_SOUND, i) as DataGameSound;
                string        soundName = BinaryUtility.bytesToString(soundData.mSoundFileName);
                mAudioTypeMap.Add(soundName, soundData.mSoundType);
                mSoundDefineMap.Add((SOUND_DEFINE)(soundData.mSoundID), soundName);
                mAudioManager.createAudio(soundName, false);
            }
        }

        // 清空所有类型正在播放的音效
        for (int i = 0; i < mMaxChannel; ++i)
        {
            mCurPlayList.Add(i, "");
        }
    }
Beispiel #6
0
    public override void execute()
    {
        if (mLoginRet.mValue == 0)
        {
            // 创建玩家
            CommandCharacterManagerCreateCharacter cmdCreate = newCmd(out cmdCreate);
            cmdCreate.mCharacterType = CHARACTER_TYPE.CT_MYSELF;
            cmdCreate.mName          = BinaryUtility.bytesToString(mName.mValue, Encoding.UTF8);
            cmdCreate.mID            = mPlayerGUID.mValue;
            pushCommand(cmdCreate, mCharacterManager);
            // 设置角色数据
            CharacterMyself myself = mCharacterManager.getMyself();
            CharacterData   data   = myself.getCharacterData();
            data.mMoney = mMoney.mValue;
            data.mHead  = mHead.mValue;

            // 进入到主场景
            CommandGameSceneManagerEnter cmdEnterMain = newCmd(out cmdEnterMain, true, true);
            cmdEnterMain.mSceneType = GAME_SCENE_TYPE.GST_MAIN;
            pushDelayCommand(cmdEnterMain, mGameSceneManager);
        }
        else if (mLoginRet.mValue == 1)
        {
            UnityUtility.logInfo("账号密码错误!");
        }
        else if (mLoginRet.mValue == 2)
        {
            UnityUtility.logInfo("已在其他地方登陆!");
        }
    }
 private bool AlreadyPatched(string path)
 {
     using (var reader = new BinaryReader(new FileStream(path, FileMode.Open)))
     {
         return(BinaryUtility.Contains(reader, PatchedOpCode));
     }
 }
Beispiel #8
0
    public void readString(byte[] str, int strBufferSize)
    {
        if (!readCheck(sizeof(int)))
        {
            return;
        }
        // 先读入字符串长度
        int readLen = 0;

        read(ref readLen);
        if (!readCheck(readLen))
        {
            return;
        }
        // 如果存放字符串的空间大小不足以放入当前要读取的字符串,则只拷贝能容纳的长度,但是下标应该正常跳转
        if (strBufferSize <= readLen)
        {
            BinaryUtility.memcpy(str, mBuffer, 0, mIndex, strBufferSize - 1);
            mIndex += readLen;
            // 加上结束符
            str[strBufferSize - 1] = 0;
        }
        else
        {
            BinaryUtility.memcpy(str, mBuffer, 0, mIndex, readLen);
            mIndex += readLen;
            // 加上结束符
            str[readLen] = 0;
        }
    }
Beispiel #9
0
        public Complex[,] GetMatrix(int bitLen, int bit1Pos, int bit2Pos)
        {
            var matrix = GetMatrix();
            var table  = AlgebraUtility.LookupTable(matrix);

            var mLen = (1 << bitLen);

            matrix = new Complex[mLen, mLen];

            for (int i = 0; i < mLen; i++)
            {
                var x =
                    (BinaryUtility.HasBit(i, bit1Pos) ? 2 : 0) +
                    (BinaryUtility.HasBit(i, bit2Pos) ? 1 : 0);

                foreach (var y in table[x])
                {
                    var j = BinaryUtility.SetBit(
                        i, bit1Pos, BinaryUtility.HasBit(y.Key, 1)
                        );
                    j = BinaryUtility.SetBit(
                        j, bit2Pos, BinaryUtility.HasBit(y.Key, 0)
                        );

                    matrix[i, j] = y.Value;
                    matrix[j, i] = y.Value;
                }
            }

            return(matrix);
        }
        public void Patch(FileInfo fileInfo)
        {
            if (FileInUse(fileInfo.Path))
            {
                Console.WriteLine($"Version: {fileInfo.Version} - IOException (Slack running?)");
                return;
            }

            if (AlreadyPatched(fileInfo.Path))
            {
                Console.WriteLine($"Version: {fileInfo.Version} - Already patched");
                return;
            }

            using (var reader = new BinaryReader(new FileStream(fileInfo.Path, FileMode.Open, FileAccess.Read)))
            {
                using (var writer = new BinaryWriter(new FileStream($"{fileInfo.Path}{PatchSuffix}", FileMode.Create)))
                {
                    BinaryUtility.Replace(reader, writer, new List <Tuple <byte[], byte[]> >()
                    {
                        Tuple.Create(OriginalOpCode, PatchedOpCode),
                    });
                }
            }
            File.Replace($"{fileInfo.Path}{PatchSuffix}", fileInfo.Path, $"{fileInfo.Path}{BackupSuffix}");
            Console.WriteLine($"Version: {fileInfo.Version} - Patched successfully");
        }
Beispiel #11
0
    protected void notifyVersionDownloaded(FileWrap versionFile)
    {
        // 版本文件下载完毕后,提示是否有新版本可以更新
        string versionString = FileUtility.openTxtFile(CommonDefine.VERSION);
        bool   hasNewVersion = false;

        if (versionString == "")
        {
            hasNewVersion = true;
        }
        else
        {
            string remoteVersion = BinaryUtility.bytesToString(versionFile.getFileData());
            hasNewVersion = remoteVersion != versionString;
        }
        if (hasNewVersion)
        {
            setState(UPGRADE_STATE.US_WAIT_FOR_UPGRADE);
        }
        else
        {
            done();
        }
        mEditorCore.sendDelayEvent(CORE_EVENT_TYPE.CET_NEW_VERSION, StringUtility.boolToString(hasNewVersion));
    }
Beispiel #12
0
 // For running pre-VM tests on methods.
 private void Test()
 {
     for (int i = 10; i >= -10; i--)
     {
         Console.WriteLine("{0}: {1}", i, BinaryUtility.ConvertIntToBinaryString(i, 16));
     }
 }
Beispiel #13
0
 public void startWaveStream(WaveFormatEx waveHeader)
 {
     mWaveDataSerializer = new Serializer();
     byte[] riffByte = new byte[4] {
         (byte)'R', (byte)'I', (byte)'F', (byte)'F'
     };
     mRiffMark = BinaryUtility.bytesToInt(riffByte);
     mFileSize = 0;
     byte[] waveByte = new byte[4] {
         (byte)'W', (byte)'A', (byte)'V', (byte)'E'
     };
     mWaveMark = BinaryUtility.bytesToInt(waveByte);
     byte[] fmtByte = new byte[4] {
         (byte)'f', (byte)'m', (byte)'t', (byte)' '
     };
     mFmtMark        = BinaryUtility.bytesToInt(fmtByte);
     mFmtChunkSize   = 16;
     mFormatType     = waveHeader.wFormatTag;
     mSoundChannels  = waveHeader.nChannels;
     mSamplesPerSec  = waveHeader.nSamplesPerSec;
     mAvgBytesPerSec = waveHeader.nAvgBytesPerSec;
     mBlockAlign     = waveHeader.nBlockAlign;
     mBitsPerSample  = waveHeader.wBitsPerSample;
     mOtherSize      = waveHeader.cbSize;
     mDataMark       = new byte[4] {
         (byte)'d', (byte)'a', (byte)'t', (byte)'a'
     };
 }
Beispiel #14
0
 public static void generateMixPCMData(short[] mixPCMData, int mixDataCount, short channelCount, byte[] dataBuffer, int bufferSize)
 {
     // 如果单声道,则直接将mDataBuffer的数据拷贝到mMixPCMData中
     if (channelCount == 1)
     {
         for (int i = 0; i < mixDataCount; ++i)
         {
             byte[] byteData0 = new byte[2];
             byteData0[0]  = (byte)dataBuffer[2 * i + 0];
             byteData0[1]  = (byte)dataBuffer[2 * i + 1];
             mixPCMData[i] = BinaryUtility.bytesToShort(byteData0);
         }
     }
     // 如果有两个声道,则将左右两个声道的平均值赋值到mMixPCMData中
     else if (channelCount == 2)
     {
         for (int i = 0; i < mixDataCount; ++i)
         {
             byte[] byteData0 = new byte[2];
             byteData0[0] = (byte)dataBuffer[4 * i + 0];
             byteData0[1] = (byte)dataBuffer[4 * i + 1];
             short  shortData0 = BinaryUtility.bytesToShort(byteData0);
             byte[] byteData1  = new byte[2];
             byteData1[0] = (byte)dataBuffer[4 * i + 2];
             byteData1[1] = (byte)dataBuffer[4 * i + 3];
             short shortData1 = BinaryUtility.bytesToShort(byteData1);
             mixPCMData[i] = (short)((shortData0 + shortData1) * 0.5f);
         }
     }
 }
Beispiel #15
0
 //----------------------------------------------------------------------------------------------------------------------------------
 protected void receiveData(short[] data, int dataCount)
 {
     // 缓冲区还能直接放下数据
     if (mCurDataCount + dataCount <= mBufferSize)
     {
         BinaryUtility.memcpy(mReceivedData, data, mCurDataCount, 0, dataCount);
         mCurDataCount += dataCount;
     }
     // 数据量超出缓冲区
     else
     {
         int copyDataCount = mBufferSize - mCurDataCount;
         BinaryUtility.memcpy(mReceivedData, data, mCurDataCount, 0, copyDataCount);
         // 数据存满后通知回调
         mRecordCallback(mReceivedData, mBufferSize);
         // 清空缓冲区,存储新的数据
         int remainCount = dataCount - copyDataCount;
         // 缓冲区无法存放剩下的数据,则将多余的数据丢弃
         if (remainCount > mBufferSize)
         {
             BinaryUtility.memcpy(mReceivedData, data, 0, copyDataCount, mBufferSize - copyDataCount);
             mCurDataCount = mBufferSize - copyDataCount;
         }
         else
         {
             BinaryUtility.memcpy(mReceivedData, data, 0, copyDataCount, remainCount);
             mCurDataCount = remainCount;
         }
     }
 }
        /// <summary>
        /// 弾丸リスト更新時
        /// </summary>
        public void OnUpdateBulletDataList(object value)
        {
            //弾丸リスト
            var list = BinaryUtility.CreateArray <BulletDto>((byte[])value);

            //発射
            for (int i = 0; i < list.Length; i++)
            {
                var data = list[i];
                if (!this.bulletList.Exists(x => x.id == data.id))
                {
                    this.CreateBullet(data);
                    this.PlayBulletFiringAnimation();
                    this.StartBarrelRotation(data.barrelLocalEulerAngles);
                }
            }

            //破棄
            for (int i = 0; i < this.bulletList.Count; i++)
            {
                var data = this.bulletList[i];
                if (!list.Any(x => x.id == data.id))
                {
                    Destroy(data.bulletBase.gameObject);
                    this.bulletList.RemoveAt(i);
                    i--;
                }
            }
        }
Beispiel #17
0
    public static LitJson.JsonData postHttpWebRequest(string url, string method, string param)
    {
        // 转换输入参数的编码类型,获取byte[]数组
        byte[] byteArray = BinaryUtility.stringToBytes("gamedata=" + param, Encoding.UTF8);
        // 初始化新的webRequst
        // 1. 创建httpWebRequest对象
        HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(new Uri(url + "/" + method));

        // 2. 初始化HttpWebRequest对象
        webRequest.Method        = "POST";
        webRequest.ContentType   = "application/x-www-form-urlencoded";
        webRequest.ContentLength = byteArray.Length;
        webRequest.Credentials   = CredentialCache.DefaultCredentials;
        webRequest.Timeout       = 5000;
        Stream newStream;

        try
        {
            //3. 附加要POST给服务器的数据到HttpWebRequest对象(附加POST数据的过程比较特殊,它并没有提供一个属性给用户存取,需要写入HttpWebRequest对象提供的一个stream里面。)
            newStream = webRequest.GetRequestStream();            //创建一个Stream,赋值是写入HttpWebRequest对象提供的一个stream里面
            newStream.Write(byteArray, 0, byteArray.Length);
            newStream.Close();
            //4. 读取服务器的返回信息
            HttpWebResponse response;
            response = (HttpWebResponse)webRequest.GetResponse();
            StreamReader php    = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
            string       phpend = php.ReadToEnd();
            return(JsonMapper.ToObject(phpend));
        }
        catch (Exception)               // 如果上面 连接的时候 有错误 那么直接 跳到二维码界面 返回 连接超时的字符串
        {
            return(null);
        }
    }
Beispiel #18
0
        public void T02_TestBitCounts()
        {
            // test methods to count leading and trailing zeros
            foreach (uint seed in new uint[] { 0xFFFFFFFF, 0x8a23b439, 0x80000001, 0xA3829f27 }) // each seed has the high and low bit set
            {
                uint f = seed, b = seed;
                for (int i = 0; i <= 32; f >>= 1, b <<= 1, i++)
                {
                    Assert.AreEqual(32 - i, BinaryUtility.BitsNeeded(f));
                    Assert.AreEqual(32 - i, BinaryUtility.BitsNeeded((ulong)f));
                    if (f == 0)
                    {
                        TestHelpers.TestException <ArgumentOutOfRangeException>(() => BinaryUtility.Log2(f));
                    }
                    else
                    {
                        Assert.AreEqual(31 - i, BinaryUtility.Log2(f));
                    }
                    if (f == 0)
                    {
                        TestHelpers.TestException <ArgumentOutOfRangeException>(() => BinaryUtility.Log2((ulong)f));
                    }
                    else
                    {
                        Assert.AreEqual(31 - i, BinaryUtility.Log2((ulong)f));
                    }
                    Assert.AreEqual(i, BinaryUtility.CountLeadingZeros(f));
                    Assert.AreEqual(i + 32, BinaryUtility.CountLeadingZeros((ulong)f));
                    Assert.AreEqual(i, BinaryUtility.CountTrailingZeros(b));
                    Assert.AreEqual(b == 0 ? i + 32 : i, BinaryUtility.CountTrailingZeros((ulong)b));
                    Assert.AreEqual(CountBits(f), BinaryUtility.CountBits(f));
                    Assert.AreEqual(CountBits(f), BinaryUtility.CountBits((ulong)f));
                    Assert.AreEqual(CountBits(b), BinaryUtility.CountBits(b));
                    Assert.AreEqual(CountBits(b), BinaryUtility.CountBits((ulong)b));
                    Assert.AreEqual(CountBits(f) + CountBits(b), BinaryUtility.CountBits(((ulong)f << 32) | b));
                }
            }

            foreach (ulong seed in new ulong[] { 0xFFFFFFFFFFFFFFFF, 0x8a23A3829f27b439, 0x8000000000000001, 0xA3828a23b4399f27 }) // each seed has the high and low bit set
            {
                ulong f = seed, b = seed;
                for (int i = 0; i <= 64; f >>= 1, b <<= 1, i++)
                {
                    Assert.AreEqual(64 - i, BinaryUtility.BitsNeeded(f));
                    if (f == 0)
                    {
                        TestHelpers.TestException <ArgumentOutOfRangeException>(() => BinaryUtility.Log2(f));
                    }
                    else
                    {
                        Assert.AreEqual(63 - i, BinaryUtility.Log2(f));
                    }
                    Assert.AreEqual(i, BinaryUtility.CountLeadingZeros(f));
                    Assert.AreEqual(i, BinaryUtility.CountTrailingZeros(b));
                    Assert.AreEqual(CountBits(f), BinaryUtility.CountBits(f));
                    Assert.AreEqual(CountBits(b), BinaryUtility.CountBits(b));
                }
            }
        }
Beispiel #19
0
 protected void removeDataFromInputBuffer(int start, int count)
 {
     if (mInputDataSize >= start + count)
     {
         BinaryUtility.memmove(ref mInputBuffer, start, start + count, mInputDataSize - start - count);
         mInputDataSize -= count;
     }
 }
Beispiel #20
0
    public static string generateFileMD5(string fileName, bool upperOrLower = true)
    {
        FileStream    file      = new FileStream(fileName, FileMode.Open);
        HashAlgorithm algorithm = MD5.Create();

        byte[] md5Bytes = algorithm.ComputeHash(file);
        return(BinaryUtility.bytesToHEXString(md5Bytes, false, upperOrLower));
    }
Beispiel #21
0
    public RegisterTool(string name)
        : base(name)
    {
        string registerCode = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUBWXYZ";

        REGISTER_CODE = BinaryUtility.stringToBytes(registerCode);
        CODE_LEN      = REGISTER_CODE.Length;
    }
Beispiel #22
0
 public virtual void parseData(PacketHeader header, byte[] data, int dataCount, ref int offset)
 {
     mHeader      = header;
     offset       = mHeader.mHeaderLength;
     mCmdID       = BinaryUtility.readByte(data, ref offset);
     mKeyID       = BinaryUtility.readByte(data, ref offset);
     mValueLength = BinaryUtility.readByte(data, ref offset);
 }
Beispiel #23
0
 public void writeBuffer(byte[] buffer, int bufferSize)
 {
     if (!writeCheck(bufferSize))
     {
         return;
     }
     BinaryUtility.writeBytes(mBuffer, ref mIndex, buffer, -1, -1, bufferSize);
 }
Beispiel #24
0
 public void readBuffer(byte[] buffer, int bufferSize, int readLen)
 {
     if (!readCheck(readLen))
     {
         return;
     }
     BinaryUtility.readBytes(mBuffer, ref mIndex, buffer, -1, bufferSize, readLen);
 }
Beispiel #25
0
 public void writeBuffer(byte[] buffer, int bufferSize)
 {
     if (!writeCheck(bufferSize))
     {
         return;
     }
     BinaryUtility.memcpy(mBuffer, buffer, mIndex, 0, bufferSize);
     mIndex += bufferSize;
 }
Beispiel #26
0
        public void TestBinaryUtility()
        {
            var helloWorld = new HelloWorld {
                Greeting = "Hello World!"
            };
            var helloWorldBinary = BinaryUtility.Serialize(helloWorld);

            Assert.AreEqual("Hello World!", BinaryUtility.Deserialize <HelloWorld>(helloWorldBinary).Greeting);
        }
Beispiel #27
0
 protected void addDataToInputBuffer(byte[] data, int count)
 {
     // 缓冲区足够放下数据时才处理
     if (count <= mInputBuffer.Length - mInputDataSize)
     {
         BinaryUtility.memcpy(mInputBuffer, data, mInputDataSize, 0, count);
         mInputDataSize += count;
     }
 }
Beispiel #28
0
    protected string getMD5(string source)
    {
        MD5 md5 = new MD5CryptoServiceProvider();

        byte[] sourceBytes = BinaryUtility.stringToBytes(source);
        byte[] result      = md5.ComputeHash(sourceBytes);
        string md5Value    = BinaryUtility.bytesToHEXString(result, false, false);

        return(md5Value);
    }
Beispiel #29
0
    public void read(ref short value, bool inverse = false)
    {
        int readLen = sizeof(short);

        if (!readCheck(readLen))
        {
            return;
        }
        value = BinaryUtility.readShort(mBuffer, ref mIndex, inverse);
    }
Beispiel #30
0
    public void read(ref byte value, bool inverse = false)
    {
        int readLen = sizeof(byte);

        if (!readCheck(readLen))
        {
            return;
        }
        value = BinaryUtility.readByte(mBuffer, ref mIndex);
    }