示例#1
0
 public EmitterPoolCookie(object cookie, EmitterStopDelegate emitterStop, float delayPostEmitterStop, EmitterStopDelegate postEmitterStop)
 {
     this.Cookie               = cookie;
     this.EmitterStop          = emitterStop;
     this.DelayPostEmitterStop = delayPostEmitterStop;
     this.PostEmitterStop      = postEmitterStop;
 }
示例#2
0
        protected void StopEmitterAndReturnToPool(object cookie, float delayPreEmitterStop, EmitterStopDelegate emitterStop, float delayPostEmitterStop, EmitterStopDelegate postEmitterStop)
        {
            EmitterPoolCookie cookie2 = new EmitterPoolCookie(cookie, emitterStop, delayPostEmitterStop, postEmitterStop);

            if (MathUtils.IsGreaterThanZero(delayPreEmitterStop))
            {
                uint timerId = Service.Get <ViewTimerManager>().CreateViewTimer(delayPreEmitterStop, false, new TimerDelegate(this.BeforeStopEmitter), cookie2);
                this.AddBeforeStopTimerId(timerId);
                return;
            }
            this.BeforeStopEmitter(0u, cookie2);
        }