Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ RequestParticle()

T Terraria.Graphics.Renderers.ParticlePool< T >.RequestParticle ( )
inline

Definition at line 32 of file ParticlePool.cs.

33 {
34 int count = _particles.Count;
35 for (int i = 0; i < count; i++)
36 {
37 if (_particles[i].IsRestingInPool)
38 {
39 _particles[i].FetchFromPool();
40 return _particles[i];
41 }
42 }
43 T val = _instantiator();
44 _particles.Add(val);
45 val.FetchFromPool();
46 return val;
47 }

References Terraria.Graphics.Renderers.ParticlePool< T >._instantiator, and Terraria.Graphics.Renderers.ParticlePool< T >._particles.