Ejemplo n.º 1
0
        ParticleSystem GetParticleInstance()
        {
            switch (effectGetMethod)
            {
            case ParticleEffectMethod.ByObjectPooling:
                return(null);    //todo: implement object pooler

            case ParticleEffectMethod.SpawnChildEffect:
                if (currentEffect == null)
                {
                    currentEffect = Instantiate(effectPrefab, transform);
                }
                currentEffect.Activate();
                return(currentEffect);

            default:
                Debug.LogError("Unknown ParticleEffectMethod: " + effectGetMethod);
                return(null);
            }
        }