本文整理汇总了C#中Shared.ReadInt32方法的典型用法代码示例。如果您正苦于以下问题:C# Shared.ReadInt32方法的具体用法?C# Shared.ReadInt32怎么用?C# Shared.ReadInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shared
的用法示例。
在下文中一共展示了Shared.ReadInt32方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateEvent
/// <summary>
/// This should read in a Type byte and create an instance of the correct type
/// Each event type should include a custom 'Execute' method that handles it
/// </summary>
protected override IEvent CreateEvent(Shared.InamStream stream)
{
int ID = stream.ReadInt32();
BrainEventType type = (BrainEventType)stream.ReadByte();
if (type == BrainEventType.System)
{
}
else if (type == BrainEventType.Sight)
{
return new BrainSightEvent(this, stream, this.entity);
}
else if (type == BrainEventType.Touch)
{
return new BrainTouchEvent(this, stream, this.entity);
}
else if (type == BrainEventType.Hear)
{
}
else if (type == BrainEventType.Taste)
{
}
// bad
return null;
}
示例2: CreateEvent
protected override IEvent CreateEvent(Shared.InamStream stream)
{
int ID = stream.ReadInt32();
TileEngineEventTypes type = (TileEngineEventTypes)stream.ReadByte();
if (type == TileEngineEventTypes.Tile)
{
return new TileEvent(this, stream);
}
// bad
return null;
}
示例3: CreateEvent
protected override IEvent CreateEvent(Shared.InamStream stream)
{
int ID = stream.ReadInt32();
TileEventType type = (TileEventType)stream.ReadByte();
if (type == TileEventType.Entity)
{
return null;
}
else if (type == TileEventType.AddEntity)
{
}
else if (type == TileEventType.RemoveEntity)
{
}
// bad
return null;
}