本文整理匯總了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));
}
}