当前位置: 首页>>代码示例>>C#>>正文


C# hsStream.WriteByte方法代码示例

本文整理汇总了C#中Plasma.hsStream.WriteByte方法的典型用法代码示例。如果您正苦于以下问题:C# hsStream.WriteByte方法的具体用法?C# hsStream.WriteByte怎么用?C# hsStream.WriteByte使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Plasma.hsStream的用法示例。


在下文中一共展示了hsStream.WriteByte方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WriteRGBA8

 public static void WriteRGBA8(hsStream s, Color c)
 {
     s.WriteByte(c.R);
     s.WriteByte(c.G);
     s.WriteByte(c.B);
     s.WriteByte(c.A);
 }
开发者ID:branan,项目名称:PlasmaDotNet,代码行数:7,代码来源:Color.cs

示例2: IWriteNetCliEncrypt

        protected void IWriteNetCliEncrypt(hsStream s, byte[] seed)
        {
            if (seed.Length != 7)
                throw new ArgumentException("seed should be an array of exactly 7 bytes");

            s.WriteByte(plNetCore.kNetCliEncrypt);
            s.WriteByte(9);
            s.WriteBytes(seed);
        }
开发者ID:branan,项目名称:PlasmaDotNet,代码行数:9,代码来源:NetServer.cs

示例3: Write

        public override void Write(hsStream s, hsResMgr mgr)
        {
            base.Write(s, mgr);

            s.WriteByte(fFlags);
            s.WriteByte(fNumFrames);
            s.WriteStdString(fVoiceData);

            s.WriteByte((byte)fReceivers.Count);
            foreach (uint r in fReceivers)
                s.WriteUInt(r);
        }
开发者ID:branan,项目名称:PlasmaDotNet,代码行数:12,代码来源:NetMsgVoice.cs

示例4: Write

        public override void Write(hsStream s, hsResMgr mgr)
        {
            base.Write(s, mgr);

            s.WriteDouble(fSecsRunning);
            s.WriteByte((byte)fSession);
        }
开发者ID:branan,项目名称:PlasmaDotNet,代码行数:7,代码来源:NetMsgPing.cs

示例5: Write

 public void Write(hsStream s)
 {
     s.WriteByte((byte)fType);
     s.WriteUShort(kHeaderSize);
     s.WriteUInt(fBuildID);
     s.WriteUInt((uint)fBuildType);
     s.WriteUInt(fBranchID);
     pnHelpers.WriteUuid(s, fProductUuid);
 }
开发者ID:branan,项目名称:PlasmaDotNet,代码行数:9,代码来源:Cli2Srv.cs

示例6: Write

        public void Write(hsStream s)
        {
            ContentsFlags contents = IGetContentFlags(s.Version);
            s.WriteByte((byte)contents);
            fLocation.Write(s);
            if (s.Version.IsPlasma20)
                if ((contents & ContentsFlags.kHasLoadMask) != 0)
                    fLoadMask.Write(s);
            plManagedType.Write(s, fClassType);
            if (s.Version.IsUruLive || s.Version.IsPlasma21)
                s.WriteUInt(fObjectID.Value);
            s.WriteSafeString(fObjectName);
            if (s.Version.IsPlasma20)
                if ((contents & ContentsFlags.kHasCloneIDs) != 0) {
                    s.WriteUInt(fCloneID);
                    s.WriteUInt(fClonePlayerID);
                }

            if (s.Version.IsPlasma21)
                if ((contents & (ContentsFlags.kHasLoadMask | ContentsFlags.kHasLoadMask2)) != 0)
                    fLoadMask.Write(s);
        }
开发者ID:branan,项目名称:PlasmaDotNet,代码行数:22,代码来源:Key.cs

示例7: VariableLengthWrite

 internal static void VariableLengthWrite(hsStream s, int size, int value)
 {
     if (size < 0x100)
         s.WriteByte((byte)value);
     else if (size < 0x10000)
         s.WriteShort((short)value);
     else
         s.WriteInt(value);
 }
开发者ID:branan,项目名称:PlasmaDotNet,代码行数:9,代码来源:SDLMgr.cs

示例8: Write

 public void Write(hsStream s)
 {
     s.WriteUInt(UnParse(s.Version));
     if (s.Version.IsPlasma21)
         s.WriteByte((byte)fFlags);
     else
         s.WriteShort((short)fFlags);
 }
开发者ID:branan,项目名称:PlasmaDotNet,代码行数:8,代码来源:Location.cs

示例9: Write

        public override void Write(hsStream s, hsResMgr mgr)
        {
            base.Write(s, mgr);

            s.WriteInt((int)fType);
            s.WriteFloat(fState);
            if (s.Version < plVersion.EndOfAges)
                s.WriteInt(fID);
            else
                s.WriteByte((byte)fID);

            s.WriteInt(fEvents.Count);
            foreach (proEventData ped in fEvents)
                ped.Write(s, mgr);
        }
开发者ID:branan,项目名称:PlasmaDotNet,代码行数:15,代码来源:NotifyMsg.cs

示例10: Read

        public override void Read(hsStream s)
        {
            base.Read(s);

            s.WriteShort((short)fAtomicCount);
            s.WriteByte((byte)fAtomicType);
        }
开发者ID:branan,项目名称:PlasmaDotNet,代码行数:7,代码来源:StateDescriptor.cs

示例11: Write

        public override void Write(hsStream s, hsResMgr mgr)
        {
            base.Write(s, mgr);

            s.WriteByte((byte)fPlayerIDs.Count);
            foreach (uint playerID in fPlayerIDs)
                s.WriteUInt(playerID);
        }
开发者ID:branan,项目名称:PlasmaDotNet,代码行数:8,代码来源:NetMsgGameMessage.cs

示例12: Write

        public override void Write(hsStream s, hsResMgr mgr)
        {
            s.WriteShort((short)fFlags);

            if (HasAccount)
                s.WriteBytes(fAcctUUID.ToByteArray());
            if (HasPlayerID)
                s.WriteUInt(fPlayerID);
            if (HasPlayerName)
                s.WriteStdString(fPlayerName);
            if (HasCCRLevel)
                s.WriteByte(fCCRLevel);
            if (HasProtectedLogin)
                s.WriteBool(fProtectedLogin);
            if (HasBuildType)
                s.WriteByte(fBuildType);
            if (HasSrcAddr)
                s.WriteUInt(fSrcAddr);
            if (HasSrcPort)
                s.WriteUShort(fSrcPort);
            if (HasReserved)
                s.WriteUShort(fReserved);
            if (HasClientKey)
                s.WriteStdString(fClientKey);
        }
开发者ID:branan,项目名称:PlasmaDotNet,代码行数:25,代码来源:ClientGuid.cs

示例13: Write

 public void Write(hsStream s)
 {
     s.WriteUInt(fParent);
     s.WriteUInt(fChild);
     s.WriteUInt(fSaver);
     s.WriteByte(0);
 }
开发者ID:Hoikas,项目名称:PlasmaDotNet,代码行数:7,代码来源:VaultNode.cs

示例14: Write

        public override void Write(hsStream s, hsResMgr mgr)
        {
            base.Write(s, mgr);

            // We're not going to compress the stream...
            // Hope this is okay!
            s.WriteInt(fBuffer.Length);
            s.WriteByte((byte)Compression.kNone);
            s.WriteInt(fBuffer.Length);
            s.WriteBytes(fBuffer);
        }
开发者ID:branan,项目名称:PlasmaDotNet,代码行数:11,代码来源:NetMsgStream.cs

示例15: Write

        public override void Write(hsStream s, hsResMgr mgr)
        {
            s.WriteInt((int)fFlags);

            if (HasVersion) {
                s.WriteByte(fVerMajor);
                s.WriteByte(fVerMinor);
            }

            if (HasTimeSent)
                plUnifiedTime.Write(s, fTimeSent);
            if (HasContext)
                s.WriteUInt(fContext);
            if (HasTransID)
                s.WriteUInt(fTransID);
            if (HasPlayerID)
                s.WriteUInt(fPlayerID);
            if (HasAccount)
                s.WriteBytes(fAcctUUID.ToByteArray());
        }
开发者ID:branan,项目名称:PlasmaDotNet,代码行数:20,代码来源:NetMessage.cs


注:本文中的Plasma.hsStream.WriteByte方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。