本文整理汇总了C#中Character.GetAnimLength方法的典型用法代码示例。如果您正苦于以下问题:C# Character.GetAnimLength方法的具体用法?C# Character.GetAnimLength怎么用?C# Character.GetAnimLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Character
的用法示例。
在下文中一共展示了Character.GetAnimLength方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleFriendHpChange
public override void HandleFriendHpChange(Character target)
{
if (target.IsDead)
{
Soul s = new Soul();
s.srcPos = target.position;
s.animlen = target.GetAnimLength("die");
s.destPos = owner.position;
s.destPos.y += 1f;
s.destChara = owner;
s.totaltime = Vector3.Distance(target.position, s.destPos) / speed;
souls.Add(s);
}
}
示例2: HandleEnemyDead
public override void HandleEnemyDead(Character target, Character attacker)
{
if (attacker == owner)
{
Soul s = new Soul();
s.srcPos = target.position;
s.animlen = target.GetAnimLength("die");
s.destPos = owner.position;
s.destPos.y += 1f;
s.destChara = owner;
s.totaltime = Vector3.Distance(target.position, s.destPos) / speed;
souls.Add(s);
}
}
示例3: OnFinishMove
private void OnFinishMove(Character c)
{
c.initAnim = "idle";
c.rotation = c.SrcRotation;
c.ForcePlayAnim(skilldata.HitAnim);
c.PlayEffect(HitEffect, 3f);
if (--numChar <= 0)
{
End(c.GetAnimLength(skilldata.HitAnim));
}
}