/** 特效播放完毕 */ public void effectPlayOver(UnitEffect effect) { int id = effect.id; int num = _effectNumDic.get(id); if (num <= 0) { Ctrl.throwError("出错,effect数目小于0"); return; } _effectNumDic.put(id, --num); _effectList.removeObj(effect); effect.dispose(); GameC.pool.unitEffectPool.back(effect); //场景特效 if (_unit.type == UnitType.SceneEffect) { SceneEffectIdentityData iData = _data.getSceneEffectIdentity(); if (iData.signedEffectID > 0) { if (id == iData.signedEffectID) { sceneEffectOver(); } } else { SceneEffectConfig config = SceneEffectConfig.get(iData.id); if (config.effectID > 0) { sceneEffectOver(); } } } }
public override void dispose() { if (_config.effectID > 0) { //绑自己的 if (BaseC.constlist.bulletCast_isSelfHit(_levelConfig.castType)) { _unit.show.removeEffect(_config.effectID); } else { if (_effect != null) { _effect.dispose(); GameC.pool.unitEffectPool.back(_effect); _effect = null; } } } base.dispose(); }