本文整理汇总了C#中Entity.SetSpeed方法的典型用法代码示例。如果您正苦于以下问题:C# Entity.SetSpeed方法的具体用法?C# Entity.SetSpeed怎么用?C# Entity.SetSpeed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Entity
的用法示例。
在下文中一共展示了Entity.SetSpeed方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Enter
public override void Enter(Entity context)
{
transform = context.transform;
direction = context.GetMedrashPosition() - transform.position;
direction.y = 0.0f;
context.SetSpeed(context.GetBaseSpeed()*1.5f);
context.SetDirection(direction);
}
示例2: Enter
public override void Enter(Entity context)
{
context.SetSpeed(0.0f);
context.MakeInvunerable();
context.SetDyingAnimation();
if (context.blood)
GameObject.Instantiate(context.blood, context.transform.position + Vector3.up*1.5f, context.transform.rotation);
}
示例3: Enter
public override void Enter(Entity context)
{
context.SetSpeed(context.GetBaseSpeed());
float r = Random.value;
rotateAngle = 120.0f*(2*r - 1)*Mathf.PI/180.0f;
if (r < 0.4)
context.RotateBy(rotateAngle);
else if (r < 0.8)
context.RotateBy(-rotateAngle);
direction = context.transform.forward;
direction.y = 0.0f;
context.SetDirection(direction);
}
示例4: Enter
public override void Enter(Entity context)
{
context.SetSpeed(context.GetBaseSpeed());
}
示例5: Enter
public override void Enter(Entity context)
{
context.SetSpeed(8.0f);
}
示例6: Enter
public override void Enter(Entity context)
{
context.SetSpeed(0.0f);
context.SetAttackAnimation();
}
示例7: Enter
public override void Enter(Entity context)
{
context.SetSpeed(context.GetBaseSpeed());
context.SetRunAnimation();
}