Managed collection of influences. Only influences with references should be used. It is up to the implementation to properly manage this collection.
More...
Managed collection of influences. Only influences with references should be used. It is up to the implementation to properly manage this collection.
◆ Clean()
void BrawlLib.Wii.Models.InfluenceManager.Clean |
( |
| ) |
|
|
inline |
73 {
74 int i = 0;
76 {
77 if (_influences[i].Users.Count <= 0)
78 {
79 _influences.RemoveAt(i);
80 }
81 else
82 {
83 i++;
84 }
85 }
86 }
int Count
Definition: InfluenceManager.cs:37
◆ FindOrCreate()
21 {
22
23 foreach (Influence i in _influences)
24 {
25 if (i.Equals(inf))
26 {
27 return i;
28 }
29 }
30
31
32 _influences.Add(inf);
33
34 return inf;
35 }
◆ GetWeighted()
Influence[] BrawlLib.Wii.Models.InfluenceManager.GetWeighted |
( |
| ) |
|
|
inline |
58 {
59 List<Influence> list = new List<Influence>(_influences.Count);
60 foreach (Influence i in _influences)
61 {
62 if (i.IsWeighted)
63 {
64 list.Add(i);
65 }
66 }
67
68 return list.ToArray();
69 }
◆ Remove()
40 {
41 for (
int i = 0; i <
Count; i++)
42 {
43 if (ReferenceEquals(_influences[i], inf) && inf.Users.Contains(user))
44 {
45 inf.Users.Remove(user);
46 if (inf.Users.Count <= 0)
47 {
48 _influences.RemoveAt(i);
49 }
50
51 break;
52 }
53 }
54 }
◆ Sort()
void BrawlLib.Wii.Models.InfluenceManager.Sort |
( |
| ) |
|
|
inline |
90 {
91 _influences.Sort(Influence.Compare);
92 }
◆ Count
int BrawlLib.Wii.Models.InfluenceManager.Count |
|
get |
◆ Influences
List<Influence> BrawlLib.Wii.Models.InfluenceManager.Influences |
|
get |
The documentation for this class was generated from the following file:
- BrawlLib/Wii/Models/InfluenceManager.cs