Beispiel #1
0
 // 更新卡牌是否可以出牌,自己手牌
 public void updateCardOutState(bool benable)
 {
     if (benable)
     {
         if (true)
         {
             if (true)
             {
                 addFrameEffect();
                 m_frameEffect.play();
             }
             else
             {
                 if (m_frameEffect != null)
                 {
                     m_frameEffect.stop();
                 }
             }
         }
     }
     else
     {
         if (m_frameEffect != null)
         {
             m_frameEffect.stop();
         }
     }
 }
Beispiel #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);
        }
Beispiel #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();
     }
 }
Beispiel #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();
 }