本文整理汇总了C#中RealmPacketIn.ReadVector3方法的典型用法代码示例。如果您正苦于以下问题:C# RealmPacketIn.ReadVector3方法的具体用法?C# RealmPacketIn.ReadVector3怎么用?C# RealmPacketIn.ReadVector3使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RealmPacketIn
的用法示例。
在下文中一共展示了RealmPacketIn.ReadVector3方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleMoveSetRawPosition
public static void HandleMoveSetRawPosition(IRealmClient client, RealmPacketIn packet)
{
var pos = packet.ReadVector3();
float orientation = packet.ReadFloat();
var region = client.ActiveCharacter.Region;
if (region != null)
{
client.ActiveCharacter.TeleportTo(region, ref pos);
}
}
示例2: HandleWorldTeleport
public static void HandleWorldTeleport(IRealmClient client, RealmPacketIn packet)
{
uint time = packet.ReadUInt32();
MapId mapId = (MapId)packet.ReadUInt32();
var pos = packet.ReadVector3();
float orientation = packet.ReadFloat(); // in client specified as degrees
var region = World.GetRegion(mapId);
if (region != null)
{
client.ActiveCharacter.TeleportTo(region, ref pos);
}
}
示例3: HandleUpdateMissilePosition
public static void HandleUpdateMissilePosition(IRealmClient client, RealmPacketIn packet)
{
var casterGuid = packet.ReadPackedEntityId();
var spellId = (SpellId)packet.ReadInt32();
var castCount = packet.ReadByte();
var position = packet.ReadVector3();
}