Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ParticleRenderer.cs
Go to the documentation of this file.
3
5
6public class ParticleRenderer
7{
9
11
13 {
15 }
16
17 public void Add(IParticle particle)
18 {
19 Particles.Add(particle);
20 }
21
22 public void Clear()
23 {
25 }
26
27 public void Update()
28 {
29 for (int i = 0; i < Particles.Count; i++)
30 {
31 if (Particles[i].ShouldBeRemovedFromRenderer)
32 {
34 {
35 pooledParticle.RestInPool();
36 }
37 Particles.RemoveAt(i);
38 i--;
39 }
40 else
41 {
42 Particles[i].Update(ref Settings);
43 }
44 }
45 }
46
47 public void Draw(SpriteBatch spriteBatch)
48 {
49 for (int i = 0; i < Particles.Count; i++)
50 {
51 if (!Particles[i].ShouldBeRemovedFromRenderer)
52 {
53 Particles[i].Draw(ref Settings, spriteBatch);
54 }
55 }
56 }
57}
void Add(TKey key, TValue value)