本文整理汇总了C#中NReader.PeekChar方法的典型用法代码示例。如果您正苦于以下问题:C# NReader.PeekChar方法的具体用法?C# NReader.PeekChar怎么用?C# NReader.PeekChar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NReader
的用法示例。
在下文中一共展示了NReader.PeekChar方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public void Read(byte[] bytes)
{
NReader reader = new NReader(new MemoryStream(bytes));
byte id;
do
{
id = reader.ReadByte();
switch (id)
{
case 0: Shots = reader.ReadInt32(); break;
case 1: ShotsThatDamage = reader.ReadInt32(); break;
case 2: SpecialAbilityUses = reader.ReadInt32(); break;
case 3: TilesUncovered = reader.ReadInt32(); break;
case 4: Teleports = reader.ReadInt32(); break;
case 5: PotionsDrunk = reader.ReadInt32(); break;
case 6: MonsterKills = reader.ReadInt32(); break;
case 7: MonsterAssists = reader.ReadInt32(); break;
case 8: GodKills = reader.ReadInt32(); break;
case 9: GodAssists = reader.ReadInt32(); break;
case 10: CubeKills = reader.ReadInt32(); break;
case 11: OryxKills = reader.ReadInt32(); break;
case 12: QuestsCompleted = reader.ReadInt32(); break;
case 13: PirateCavesCompleted = reader.ReadInt32(); break;
case 14: UndeadLairsCompleted = reader.ReadInt32(); break;
case 15: AbyssOfDemonsCompleted = reader.ReadInt32(); break;
case 16: SnakePitsCompleted = reader.ReadInt32(); break;
case 17: SpiderDensCompleted = reader.ReadInt32(); break;
case 18: SpriteWorldsCompleted = reader.ReadInt32(); break;
case 19: LevelUpAssists = reader.ReadInt32(); break;
case 20: MinutesActive = reader.ReadInt32(); break;
case 21: TombsCompleted = reader.ReadInt32(); break;
case 22: TrenchesCompleted = reader.ReadInt32(); break;
case 23: JunglesCompleted = reader.ReadInt32(); break;
case 24: ManorsCompleted = reader.ReadInt32(); break;
}
} while (reader.PeekChar() != -1);
}