// 更新卡牌是否可以出牌,自己手牌 public void updateCardOutState(bool benable) { if (benable) { if (m_card.sceneCardItem != null) { if (m_card.sceneCardItem.svrCard.mpcost <= Ctx.m_instance.m_dataPlayer.m_dzData.m_playerArr[(int)m_card.sceneCardItem.playerSide].m_heroMagicPoint.mp) { addFrameEffect(); m_frameEffect.play(); } else { if (m_frameEffect != null) { m_frameEffect.stop(); } } } } else { if (m_frameEffect != null) { m_frameEffect.stop(); } } }
public void updateEffect(bool bEnable) { if (bEnable) { if (!hasLeftMagicPtCanUse()) // 如果没有 Mp 值可以使用 { if (m_effect == null) { addFrameEffect(); } else { m_effect.play(); } } else { if (m_effect != null) { m_effect.stop(); } } } else { if (m_effect != null) { m_effect.stop(); } } }
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(); }
public void updateEffect() { if (m_effect == null) { addFrameEffect(); } else { m_effect.play(); } }
public void playEffect() { if (m_effect == null) { m_effect = Ctx.m_instance.m_sceneEffectMgr.addLinkEffect(15, m_model.selfGo, false); m_effect.linkedEntity = this; } else { m_effect.play(); } }
// 添加技能准备特效,主要是法术卡,但是释放的时候基本都是英雄卡上 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(); } }