Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
EffectManager.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3
4public class EffectManager : EMono
5{
6 [Serializable]
7 public class EffectList : DynamicAsset<Effect>
8 {
9 public Effect Get(string id)
10 {
11 return GetNew(id);
12 }
13 }
14
15 [NonSerialized]
16 public List<Effect> list = new List<Effect>();
17
18 public static EffectManager Instance;
19
21
22 public void Add(Effect e)
23 {
24 list.Add(e);
25 }
26
27 public void Remove(Effect e)
28 {
29 list.Remove(e);
30 }
31
32 public void KillAll()
33 {
34 for (int num = list.Count - 1; num >= 0; num--)
35 {
36 list[num].Kill();
37 }
38 }
39
40 public void UpdateEffects()
41 {
42 for (int num = list.Count - 1; num >= 0; num--)
43 {
44 list[num].OnUpdate();
45 }
46 }
47}
T GetNew(string id, Transform parent=null)
Definition: DynamicAsset.cs:40
Definition: EMono.cs:4
Effect Get(string id)
Definition: EffectManager.cs:9
void UpdateEffects()
EffectList effects
static EffectManager Instance
void Remove(Effect e)
void Add(Effect e)
List< Effect > list
Definition: Effect.cs:7