當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。