public Particle Emit(IParticleLogic logic, float life) { if (particle_pool.Count == 0) return null; Particle particle = particle_pool.Dequeue(); particle.in_pool = false; particle.Create(logic, life); return particle; }
public void Emit() { if (count > 80) { return; } ParticleManager particlemanager = ParticleManager.GetInstance(); particlemanager.Emit(this, (float)rand.NextDouble() * life); }