/// <summary> /// 将特效对象归还到对象池 by吴江 /// </summary> /// <param name="_indicator"></param> public bool DespawnEffecter(PoolEffecter _Effecter) { if (_Effecter == null) { Debug.LogError("_Effecter为空!无法归还!"); return(false); } _Effecter.OnDespawned(); exComponentPool <PoolEffecter> pool = null; if (defEffectPoolDictionary.TryGetValue(_Effecter.name, out pool)) { if (pool != null) { try { pool.Return(_Effecter); return(true); } catch { GameObject.DestroyImmediate(_Effecter); } } else { GameObject.DestroyImmediate(_Effecter); } } else { GameObject.DestroyImmediate(_Effecter); } return(false); }
/// <summary> /// 将技能延迟特效对象归还到对象池 by吴江 /// </summary> /// <param name="_indicator"></param> public void DespawnAbilityDelayEffectCtrl(AbilityDelayEffectCtrl _abilityDelayEffectCtrl) { _abilityDelayEffectCtrl.OnDespawned(); abilityDelayEffectCtrlPool.Return(_abilityDelayEffectCtrl); }
/// <summary> /// 将弹道对象归还到对象池 by吴江 /// </summary> /// <param name="_indicator"></param> public void DespawnAbilityBallisticCurve(AbilityBallisticCurve abilityBallisticCurve) { abilityBallisticCurve.OnDespawned(); abilityBallisticCurvePool.Return(abilityBallisticCurve); }
/// <summary> /// 将漂浮文字的对象归还到对象池 by吴江 /// </summary> /// <param name="_indicator"></param> public void DespawnStateTexter(StateTexter _stateTexter) { _stateTexter.OnDespawned(); stateTexterPool.Return(_stateTexter); }
/// <summary> /// 将点击地面特效的对象归还到对象池 by吴江 /// </summary> /// <param name="_indicator"></param> public void DespawnIndicator(Indicator _indicator) { _indicator.OnDespawned(); indicatorPool.Return(_indicator); }
/// <summary> /// 将脚下光圈的对象归还到对象池 by吴江 /// </summary> /// <param name="_indicator"></param> public void DespawnRingEffecter(RingEffecter _ringEffecter) { _ringEffecter.OnDespawned(); ringEffecterPool.Return(_ringEffecter); }
/// <summary> /// 将 技能预警投射器的对象归还到对象池 by吴江 /// </summary> /// <param name="_indicator"></param> public void DespawnAbilityShadowEffecter(AbilityShadowEffecter _abilityShadowEffecter) { _abilityShadowEffecter.OnDespawned(); AbilityShadowEffectorPool.Return(_abilityShadowEffecter); }
/// <summary> /// 将 阴影投射器的对象归还到对象池 by吴江 /// </summary> /// <param name="_indicator"></param> public void DespawnShadowEffecter(ShadowEffecter _shadowEffecter) { _shadowEffecter.OnDespawned(); shadowEffectorPool.Return(_shadowEffecter); }