本文整理汇总了C#中IMyEntity.Stop方法的典型用法代码示例。如果您正苦于以下问题:C# IMyEntity.Stop方法的具体用法?C# IMyEntity.Stop怎么用?C# IMyEntity.Stop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMyEntity
的用法示例。
在下文中一共展示了IMyEntity.Stop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CommonProcess
private void CommonProcess(IMyEntity entity)
{
if (entity == null)
return;
if (SyncType.HasFlag(SyncEntityType.Stop))
entity.Stop();
// The Physics.LinearVelocity doesn't change the player speed quickly enough before SetPosition is called, as
// the player will smack into the other obejct before it's correct velocity is actually registered.
if (SyncType.HasFlag(SyncEntityType.Velocity) && entity.Physics != null)
entity.Physics.LinearVelocity = Velocity;
// The SetWorldMatrix doesn't rotate the player quickly enough before SetPosition is called, as
// the player will bounce off objects before it's correct orentation is actually registered.
if (SyncType.HasFlag(SyncEntityType.Matrix))
entity.SetWorldMatrix(Matrix);
if (SyncType.HasFlag(SyncEntityType.Position))
entity.SetPosition(Position);
}