本文整理汇总了C#中Character.PlayEffect方法的典型用法代码示例。如果您正苦于以下问题:C# Character.PlayEffect方法的具体用法?C# Character.PlayEffect怎么用?C# Character.PlayEffect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Character
的用法示例。
在下文中一共展示了Character.PlayEffect方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Fear
void Fear(Character target)
{
effKeepObj = target.PlayEffect(KeepEffect, -1f);
destPos = target.position;
List<Character> allEnemy = Fight.Inst.GetAllCharacter(attacker.camp == CampType.Friend ? CampType.Enemy : CampType.Friend);
for (int i = 0; i < GameMgr.GamePlayer.MAXOPENSLOTNUM; ++i)
{
bool empty = true;
for (int n = allEnemy.Count - 1; n >= 0; --n)
{
Character e = allEnemy[n];
if (e.IsDead == false && e.slot == i)
{
empty = false;
break;
}
}
int slot = i;
if (empty && Fight.Inst.HasSlotPos(target.camp, slot))
{
destPos = Fight.Inst.GetSlotPos(target.camp, slot);
destSlot = i;
break;
}
}
StartCoroutine(FearMove(target, target.position, 4, 0f));
}
示例2: Init
protected override bool Init()
{
hitEff = null;
num = Num;
locker = Fight.Inst.FindAttackTarget(owner);
if (locker != null)
{
PlaySelfEffect();
owner.idleAnim = Anim;
owner.Idle();
owner.isXuLi = true;
hitEff = locker.PlayEffect(HitEffect, -1f);
owner.target = locker;
AddTbuff(owner);
return true;
}
return false;
}
示例3: FindLocker
void FindLocker()
{
locker = Fight.Inst.FindAttackTarget(owner);
if (locker != null)
{
hitEff = locker.PlayEffect(HitEffect, -1f);
owner.target = locker;
}
}
示例4: 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));
}
}