Esempio n. 1
0
        public static EmitterPool CreateEmitterPool(ParticleSystem emitter, EmitterReturnedToPool emitterReturnedToPool)
        {
            EmitterPool result = null;

            if (emitter != null)
            {
                GameObject gameObject = emitter.gameObject;
                while (gameObject.transform.parent != null)
                {
                    gameObject = gameObject.transform.parent.gameObject;
                }
                ParticleSystem[] allEmitters = MultipleEmittersPool.GetAllEmitters(gameObject);
                if (allEmitters.Length > 1)
                {
                    result = new MultipleEmittersPool(gameObject, emitterReturnedToPool);
                }
                else
                {
                    result = new SingleEmitterPool(emitter, emitterReturnedToPool);
                }
            }
            return(result);
        }
Esempio n. 2
0
 public unsafe static long $Invoke0(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(EmitterPool.CreateEmitterPool((ParticleSystem)GCHandledObjects.GCHandleToObject(*args), (EmitterReturnedToPool)GCHandledObjects.GCHandleToObject(args[1]))));
 }