本文整理汇总了C#中System.Utils.ReadByte方法的典型用法代码示例。如果您正苦于以下问题:C# Utils.ReadByte方法的具体用法?C# Utils.ReadByte怎么用?C# Utils.ReadByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Utils
的用法示例。
在下文中一共展示了Utils.ReadByte方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: deserialize
public static EnabledChannelsMessage deserialize(Utils.Objects.Packet sender)
{
int nEnabled = sender.ReadShort();
List<Channel> enabled = new List<Channel>();
for (int i = 0; i < nEnabled; ++i)
enabled.Add( (Channel)sender.ReadByte() );
int nDisabled = sender.ReadShort();
List<Channel> disabled = new List<Channel>();
for (int i = 0; i < nDisabled; ++i)
disabled.Add( (Channel)sender.ReadByte() );
return new EnabledChannelsMessage(enabled, disabled);
}
示例2: deserialize
public static CharacterCreationRequestMessage deserialize(Utils.Objects.Packet packet)
{
string name = packet.ReadUTF();
Breed breed = (Breed)packet.ReadByte();
Gender gender = (Gender)packet.ReadByte();
int[] colors = new int[6];
for (int i = 0; i < 6; ++i)
colors[i] = packet.ReadInt();
return new CharacterCreationRequestMessage
(new object[]{
name, breed, gender, colors
});
}
示例3: deserialize
public static CharacterCreationRequestMessage deserialize(Utils.Objects.Packet packet)
{
string name = packet.ReadUTF();
Classe classe = (Classe)packet.ReadByte();
Sexe sexe = (Sexe)packet.ReadByte();
int[] colors = new int[6];
for (int i = 0; i < 6; ++i)
colors[i] = packet.ReadInt();
return new CharacterCreationRequestMessage
(
new Global.Character
(
name, classe, sexe, colors
)
);
}
示例4: deserialize
public static GameContextCreateMessage deserialize(Utils.Objects.Packet sender)
{
return new GameContextCreateMessage( (Enums.GameContextEnum)sender.ReadByte() );
}
开发者ID:Emudofus,项目名称:Aldos,代码行数:4,代码来源:GameContextCreateMessage+(Antoine-PC's+conflicted+copy+2011-02-12).cs
示例5: deserialize
public static CharacterDeletionErrorMessage deserialize(Utils.Objects.Packet sender)
{
return new CharacterDeletionErrorMessage((Network.Enums.CharacterDeletionErrorEnum)sender.ReadByte());
}
示例6: deserialize
public static CharacterCreationResultMessage deserialize(Utils.Objects.Packet sender)
{
return new CharacterCreationResultMessage((Enums.CharacterCreationResult)sender.ReadByte());
}
示例7: deserialize
public static ChannelEnablingMessage deserialize(Utils.Objects.Packet sender)
{
return new ChannelEnablingMessage((Channel)sender.ReadByte(), sender.ReadBool());
}
示例8: deserialize
public static IdentificationFailedMessage deserialize(Utils.Objects.Packet sender)
{
return new IdentificationFailedMessage( (Enums.IdentificationFailureReason)sender.ReadByte() );
}
示例9: deserialize
public static ChatClientMultiMessage deserialize(Utils.Objects.Packet sender)
{
return new ChatClientMultiMessage(sender.ReadUTF(), (Channel)sender.ReadByte());
}
示例10: deserialize
public static Version deserialize(Utils.Objects.Packet sender)
{
return new Version(sender.ReadByte(), sender.ReadByte(), sender.ReadByte(), sender.ReadUShort(),
sender.ReadByte(), sender.ReadByte());
}