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


C# Serial类代码示例

本文整理汇总了C#中Serial的典型用法代码示例。如果您正苦于以下问题:C# Serial类的具体用法?C# Serial怎么用?C# Serial使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: ObjectInfoPacket

        public ObjectInfoPacket(PacketReader reader)
            : base(0x1A, "ObjectInfoPacket")
        {
            Serial = reader.ReadInt32();
            ItemID = reader.ReadUInt16();

            Amount = (ushort)(((Serial & 0x80000000) == 0x80000000) ? reader.ReadUInt16() : 0);

            X = reader.ReadInt16();
            Y = reader.ReadInt16();
                        
            Direction = (byte)(((X & 0x8000) == 0x8000) ? reader.ReadByte() : 0);

            Z = reader.ReadSByte();

            Hue = (ushort)(((Y & 0x8000) == 0x8000) ? reader.ReadUInt16() : 0);

            Flags = (byte)(((Y & 0x4000) == 0x4000) ? reader.ReadByte() : 0);

            // sanitize values
            Serial = (int)(Serial & 0x7FFFFFFF);
            ItemID = (ushort)(ItemID & 0x7FFF);
            X = (short)(X & 0x7FFF);
            Y = (short)(Y & 0x3FFF);
        }
开发者ID:msx752,项目名称:UltimaXNA,代码行数:25,代码来源:ObjectInfoPacket.cs

示例2: GetPlayerStatusPacket

 public GetPlayerStatusPacket(byte type, Serial serial)
     : base(0x34, "Get Player Status", 10)
 {
     Stream.Write(0xEDEDEDED);//Unknown
     Stream.Write((byte)type);
     Stream.Write(serial);
 }
开发者ID:gautamabudha,项目名称:UltimaXNA,代码行数:7,代码来源:GetPlayerStatusPacket.cs

示例3: ZinagaPants

        public ZinagaPants(Serial serial): base(serial) 
		{ 
			DefineMods();
			
			if ( Parent != null && this.Parent is Mobile ) 
				SetMods( (Mobile)Parent );
		} 
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:7,代码来源:Zinaga+Pants.cs

示例4: PartyHealthTrackerGump

        public PartyHealthTrackerGump(PartyMember member)
            : base(member.Serial, 0)
        {
            while (UserInterface.GetControl<MobileHealthTrackerGump>() != null)
            {
                UserInterface.GetControl<MobileHealthTrackerGump>(member.Serial).Dispose();
            }
            IsMoveable = false;
            IsUncloseableWithRMB = true;
            m_Serial = member.Serial;
            //AddControl(m_Background = new ResizePic(this, 0, 0, 3000, 131, 48));//I need opacity %1 background

            AddControl(m_Name = new TextLabel(this, 1, 0, 1, member.Name));
            //m_Background.MouseDoubleClickEvent += Background_MouseDoubleClickEvent; //maybe private message calling?
            m_BarBGs = new GumpPic[3];
            int sameX = 15;
            int sameY = 3;
            if (WorldModel.Entities.GetPlayerEntity().Serial != member.Serial)//you can't send a message to self
            {
                AddControl(btnPrivateMsg = new Button(this, 0, 20, 11401, 11402, ButtonTypes.Activate, member.Serial, 0));//private party message / use bandage ??
            }
            AddControl(m_BarBGs[0] = new GumpPic(this, sameX, 15 + sameY, 9750, 0));
            AddControl(m_BarBGs[1] = new GumpPic(this, sameX, 24 + sameY, 9750, 0));
            AddControl(m_BarBGs[2] = new GumpPic(this, sameX, 33 + sameY, 9750, 0));
            m_Bars = new GumpPicWithWidth[3];
            AddControl(m_Bars[0] = new GumpPicWithWidth(this, sameX, 15 + sameY, 40, 0, 1f));//I couldn't find correct visual
            AddControl(m_Bars[1] = new GumpPicWithWidth(this, sameX, 24 + sameY, 9751, 0, 1f));//I couldn't find correct visual
            AddControl(m_Bars[2] = new GumpPicWithWidth(this, sameX, 33 + sameY, 41, 0, 1f));//I couldn't find correct visual

            // bars should not handle mouse input, pass it to the background gump.
            for (int i = 0; i < m_BarBGs.Length; i++)//???
            {
                m_Bars[i].HandlesMouseInput = false;
            }
        }
开发者ID:jorsi,项目名称:UltimaXNA,代码行数:35,代码来源:PartyHealthTrackerGump.cs

示例5: DropToLayerPacket

 public DropToLayerPacket(Serial itemSerial, byte layer, Serial playerSerial)
     : base(0x13, "Drop To Layer", 10)
 {
     Stream.Write(itemSerial);
     Stream.Write((byte)layer);
     Stream.Write(playerSerial);
 }
开发者ID:gautamabudha,项目名称:UltimaXNA,代码行数:7,代码来源:DropToLayerPacket.cs

示例6: BeltOfTheMagi

		public BeltOfTheMagi( Serial serial ) : base( serial )
		{ 
			DefineMods();
			
			if ( Parent != null && this.Parent is Mobile ) 
				SetMods( (Mobile)Parent );
		} 
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:7,代码来源:BeltOfTheMagi.cs

示例7: TopMenu

 public TopMenu(Serial serial)
     : base(serial, 0)
 {
     // maximized view
     AddControl(new ResizePic(this, 1, 0, 0, 9200, 610, 27));
     AddControl(new Button(this, 1, 5, 3, 5540, 5542, 0, 2, 0));
     ((Button)LastControl).GumpOverID = 5541;
     // buttons are 2443 small, 2445 big
     // 30, 93, 201, 309, 417, 480, 543
     // map, paperdollB, inventoryB, journalB, chat, help, < ? >
     AddControl(new Button(this, 1, 30, 3, 2443, 2443, ButtonTypes.Activate, 0, (int)Buttons.Map));
     ((Button)LastControl).Caption = "<basefont color=#000000>Map";
     AddControl(new Button(this, 1, 93, 3, 2445, 2445, ButtonTypes.Activate, 0, (int)Buttons.Paperdoll));
     ((Button)LastControl).Caption = "<basefont color=#000000>Paperdoll";
     AddControl(new Button(this, 1, 201, 3, 2445, 2445, ButtonTypes.Activate, 0, (int)Buttons.Inventory));
     ((Button)LastControl).Caption = "<basefont color=#000000>Inventory";
     AddControl(new Button(this, 1, 309, 3, 2445, 2445, ButtonTypes.Activate, 0, (int)Buttons.Journal));
     ((Button)LastControl).Caption = "<basefont color=#000000>Journal";
     AddControl(new Button(this, 1, 417, 3, 2443, 2443, ButtonTypes.Activate, 0, (int)Buttons.Chat));
     ((Button)LastControl).Caption = "<basefont color=#000000>Chat";
     AddControl(new Button(this, 1, 480, 3, 2443, 2443, ButtonTypes.Activate, 0, (int)Buttons.Help));
     ((Button)LastControl).Caption = "<basefont color=#000000>Help";
     AddControl(new Button(this, 1, 543, 3, 2443, 2443, ButtonTypes.Activate, 0, (int)Buttons.Question));
     ((Button)LastControl).Caption = "<basefont color=#000000>Debug";
     // minimized view
     AddControl(new ResizePic(this, 2, 0, 0, 9200, 30, 27));
     AddControl(new Button(this, 2, 5, 3, 5537, 5539, 0, 1, 0));
     ((Button)LastControl).GumpOverID = 5538;
 }
开发者ID:Crwth,项目名称:UltimaXNA,代码行数:29,代码来源:TopMenu.cs

示例8: AlligatorBelt

		public AlligatorBelt( Serial serial ) : base( serial )
		{ 
			DefineMods();
			
			if ( Parent != null && this.Parent is Mobile ) 
				SetMods( (Mobile)Parent );
		} 
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:7,代码来源:AlligatorBelt.cs

示例9: Mobile

 public Mobile(Serial serial)
     : base(serial)
 {
     m_equipment = new MobileEquipment(this);
     m_animation = new MobileAnimation(this);
     m_movement.RequiresUpdate = true;
 }
开发者ID:FreeReign,项目名称:UltimaXNA,代码行数:7,代码来源:Mobile.cs

示例10: CloakOfTheGodlyTailor

        public CloakOfTheGodlyTailor(Serial serial): base(serial) 
		{ 
			DefineMods();
			
			if ( Parent != null && this.Parent is Mobile ) 
				SetMods( (Mobile)Parent );
		} 
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:7,代码来源:CloakOfTheGodlyTailor.cs

示例11: CustomHousePacket

        public CustomHousePacket(PacketReader reader)
            : base(0xD8, "Custom House Packet")
        {
            byte CompressionType = reader.ReadByte();
            if (CompressionType != 3)
            {
                _houseSerial = Serial.Null;
                return;
            }
            reader.ReadByte(); // unknown, always 0?
            _houseSerial = reader.ReadInt32();
            _revisionHash = reader.ReadInt32();

            // this is for compression type 3 only
            int bufferLength = reader.ReadInt16();
            int trueBufferLength = reader.ReadInt16();
            _numPlanes = reader.ReadByte();
            // end compression type 3

            _planes = new CustomHousePlane[_numPlanes];
            for (int i = 0; i < _numPlanes; i++)
            {
                _planes[i] = new CustomHousePlane(reader);
            }
        }
开发者ID:Crwth,项目名称:UltimaXNA,代码行数:25,代码来源:CustomHousePacket.cs

示例12: EquipmentEntry

 public EquipmentEntry(Serial serial, ushort gumpId, byte layer, ushort hue)
 {
     Serial = serial;
     GumpId = gumpId;
     Layer = layer;
     Hue = hue;
 }
开发者ID:msx752,项目名称:UltimaXNA,代码行数:7,代码来源:EquipmentEntry.cs

示例13: QuestGumpRequestPacket

 public QuestGumpRequestPacket(Serial serial)
     : base(0xD7, "Quest gump request")
 {
     Stream.Write(serial);
     Stream.Write((ushort)0x0032);
     Stream.Write((byte)0x00);
 }
开发者ID:msx752,项目名称:UltimaXNA,代码行数:7,代码来源:QuestGumpRequestPacket.cs

示例14: DruidCloak

		public DruidCloak( Serial serial ) : base( serial ) 
		{ 
			DefineMods();
			
			if ( Parent != null && this.Parent is Mobile ) 
				SetMods( (Mobile)Parent );
		} 
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:7,代码来源:DruidCloak.cs

示例15: ContextMenuResponsePacket

 public ContextMenuResponsePacket(Serial serial, short responseIndex)
     : base(0xBF, "Context Menu Response")
 {
     Stream.Write((short)0x15); // subcommand 0x15,  response to context menu
     Stream.Write((int)serial);
     Stream.Write((short)responseIndex);
 }
开发者ID:gautamabudha,项目名称:UltimaXNA,代码行数:7,代码来源:GeneralInformationPackets.cs


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