示例#1
0
 protected void changeFrameEffectId()
 {
     m_frameEffect.setTableID(m_frameEffectId);
     if (m_frameEffect.bPlay())
     {
         m_frameEffect.stop();                       // 直接停止掉
         m_frameEffect.play();
     }
     else
     {
         m_frameEffect.stop();
     }
 }
示例#2
0
        //public void removeAndDestroy(EffectBase effect)
        //{
        //    this.delObject(effect);
        //    effect.dispose();
        //}

        // 添加连接特效,固定不动
        public LinkEffect addLinkEffect(int id, GameObject pntGO_, bool bAutoRemove = true, bool bLoop = false, bool bPlay = true)
        {
            LinkEffect effect = createAndAdd(EffectType.eLinkEffect, EffectRenderType.eSpriteEffectRender) as LinkEffect;

            effect.setPnt(pntGO_);
            effect.setLoop(bLoop);
            effect.setTableID(id);
            effect.bAutoRemove = bAutoRemove;

            if (bPlay)
            {
                effect.play();
            }

            return(effect);
        }
示例#3
0
 // 添加技能准备特效,主要是法术卡,但是释放的时候基本都是英雄卡上
 public void startSkillAttPrepareEffect(int effectId)
 {
     if (m_skillAttPrepareEffect == null)
     {
         m_skillAttPrepareEffect = addLinkEffect(effectId, false, true);
     }
     else
     {
         m_skillAttPrepareEffect.setTableID(effectId);
         if (m_skillAttPrepareEffect.bPlay())
         {
             m_skillAttPrepareEffect.stop();                       // 直接停止掉
         }
         m_skillAttPrepareEffect.play();
     }
 }
示例#4
0
 protected void testSpriteEffect()
 {
     m_linkEffect = Ctx.m_instance.m_sceneEffectMgr.createAndAdd(EffectType.eLinkEffect, EffectRenderType.eSpriteEffectRender) as LinkEffect;
     m_linkEffect.setGameObject(m_spriteGo);
     m_linkEffect.setTableID(1);
     m_linkEffect.setLoop(true);
     m_linkEffect.play();
 }