本文整理汇总了C#中Location.IsNaN方法的典型用法代码示例。如果您正苦于以下问题:C# Location.IsNaN方法的具体用法?C# Location.IsNaN怎么用?C# Location.IsNaN使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Location
的用法示例。
在下文中一共展示了Location.IsNaN方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShouldSeePositionPreviously
public bool ShouldSeePositionPreviously(Location pos)
{
if (pos.IsNaN() || lPos.IsNaN())
{
return false;
}
return ShouldSeeChunkPreviously(TheRegion.ChunkLocFor(pos));
}
示例2: ShouldSeePosition
public bool ShouldSeePosition(Location pos)
{
if (pos.IsNaN())
{
return false;
}
return ShouldSeeChunk(TheRegion.ChunkLocFor(pos));
}
示例3: ShouldSeePositionOneSecondAgo
public bool ShouldSeePositionOneSecondAgo(Location pos)
{
if (pos.IsNaN() || losPos.IsNaN())
{
return false;
}
return ShouldSeeChunkOneSecondAgo(TheRegion.ChunkLocFor(pos));
}
示例4: PlaySound
public void PlaySound(string sound, Location pos, double vol, double pitch)
{
bool nan = pos.IsNaN();
Vector3i cpos = nan ? Vector3i.Zero : ChunkLocFor(pos);
PlaySoundPacketOut packet = new PlaySoundPacketOut(TheServer, sound, vol, pitch, pos);
foreach (PlayerEntity player in Players)
{
if (nan || player.CanSeeChunk(cpos))
{
player.Network.SendPacket(packet);
}
}
}