예제 #1
0
    /// <summary>
    /// 从对象池中取出 阴影投射器的对象 by吴江
    /// </summary>
    /// <param name="_pos"></param>
    /// <param name="_rot"></param>
    /// <returns></returns>
    public ShadowEffecter SpawnShadowEffecter(Vector3 _pos, Quaternion _rot, Transform _parent)
    {
        ShadowEffecter shadowEffecter = shadowEffectorPool.Request(_pos, _rot, _parent);

        if (_parent != null)
        {
            shadowEffecter.gameObject.layer = _parent.gameObject.layer;
        }
        shadowEffecter.OnSpawned();
        return(shadowEffecter);
    }
예제 #2
0
 /// <summary>
 /// 将 阴影投射器的对象归还到对象池 by吴江
 /// </summary>
 /// <param name="_indicator"></param>
 public void DespawnShadowEffecter(ShadowEffecter _shadowEffecter)
 {
     _shadowEffecter.OnDespawned();
     shadowEffectorPool.Return(_shadowEffecter);
 }