当前位置: 首页>>代码示例>>C#>>正文


C# Character.PlayEffect方法代码示例

本文整理汇总了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));
    }
开发者ID:wenhu2010,项目名称:mygame,代码行数:30,代码来源:NfFear.cs

示例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;
    }
开发者ID:wenhu2010,项目名称:mygame,代码行数:20,代码来源:NfSnipeBuff.cs

示例3: FindLocker

 void FindLocker()
 {
     locker = Fight.Inst.FindAttackTarget(owner);
     if (locker != null)
     {
         hitEff = locker.PlayEffect(HitEffect, -1f);
         owner.target = locker;
     }
 }
开发者ID:wenhu2010,项目名称:mygame,代码行数:9,代码来源:NfSnipeBuff.cs

示例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));
        }
    }
开发者ID:wenhu2010,项目名称:mygame,代码行数:12,代码来源:NfFenLie.cs


注:本文中的Character.PlayEffect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。