예제 #1
0
    /// <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);
    }
예제 #2
0
 /// <summary>
 /// 将技能延迟特效对象归还到对象池 by吴江
 /// </summary>
 /// <param name="_indicator"></param>
 public void DespawnAbilityDelayEffectCtrl(AbilityDelayEffectCtrl _abilityDelayEffectCtrl)
 {
     _abilityDelayEffectCtrl.OnDespawned();
     abilityDelayEffectCtrlPool.Return(_abilityDelayEffectCtrl);
 }
예제 #3
0
 /// <summary>
 /// 将弹道对象归还到对象池 by吴江
 /// </summary>
 /// <param name="_indicator"></param>
 public void DespawnAbilityBallisticCurve(AbilityBallisticCurve abilityBallisticCurve)
 {
     abilityBallisticCurve.OnDespawned();
     abilityBallisticCurvePool.Return(abilityBallisticCurve);
 }
예제 #4
0
 /// <summary>
 /// 将漂浮文字的对象归还到对象池 by吴江
 /// </summary>
 /// <param name="_indicator"></param>
 public void DespawnStateTexter(StateTexter _stateTexter)
 {
     _stateTexter.OnDespawned();
     stateTexterPool.Return(_stateTexter);
 }
예제 #5
0
 /// <summary>
 /// 将点击地面特效的对象归还到对象池 by吴江
 /// </summary>
 /// <param name="_indicator"></param>
 public void DespawnIndicator(Indicator _indicator)
 {
     _indicator.OnDespawned();
     indicatorPool.Return(_indicator);
 }
예제 #6
0
 /// <summary>
 /// 将脚下光圈的对象归还到对象池 by吴江
 /// </summary>
 /// <param name="_indicator"></param>
 public void DespawnRingEffecter(RingEffecter _ringEffecter)
 {
     _ringEffecter.OnDespawned();
     ringEffecterPool.Return(_ringEffecter);
 }
예제 #7
0
 /// <summary>
 /// 将 技能预警投射器的对象归还到对象池 by吴江
 /// </summary>
 /// <param name="_indicator"></param>
 public void DespawnAbilityShadowEffecter(AbilityShadowEffecter _abilityShadowEffecter)
 {
     _abilityShadowEffecter.OnDespawned();
     AbilityShadowEffectorPool.Return(_abilityShadowEffecter);
 }
예제 #8
0
 /// <summary>
 /// 将 阴影投射器的对象归还到对象池 by吴江
 /// </summary>
 /// <param name="_indicator"></param>
 public void DespawnShadowEffecter(ShadowEffecter _shadowEffecter)
 {
     _shadowEffecter.OnDespawned();
     shadowEffectorPool.Return(_shadowEffecter);
 }