This repository was archived by the owner on Jul 2, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAddMany.go
More file actions
89 lines (81 loc) · 2.66 KB
/
Copy pathAddMany.go
File metadata and controls
89 lines (81 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package ecs
// add 2 components to an entity
// automatically register component if ecs.AutoRegisterComponents
// is true (default)
// This is just a wrapper arround calling ecs.Add multiple times
func Add2[A any, B any](p *Pool, e Entity,
c1 A, c2 B,
) {
Add(p, e, c1)
Add(p, e, c2)
}
// add 3 components to an entity
// automatically register component if ecs.AutoRegisterComponents
// is true (default)
// This is just a wrapper arround calling ecs.Add multiple times
func Add3[A any, B any, C any](p *Pool, e Entity,
c1 A, c2 B, c3 C,
) {
Add2(p, e, c1, c2)
Add(p, e, c3)
}
// add 4 components to an entity
// automatically register component if ecs.AutoRegisterComponents
// is true (default)
// This is just a wrapper arround calling ecs.Add multiple times
func Add4[A any, B any, C any, D any](p *Pool, e Entity,
c1 A, c2 B, c3 C, c4 D,
) {
Add3(p, e, c1, c2, c3)
Add(p, e, c4)
}
// add 5 components to an entity
// automatically register component if ecs.AutoRegisterComponents
// is true (default)
// This is just a wrapper arround calling ecs.Add multiple times
func Add5[A any, B any, C any, D any, E any](p *Pool, e Entity,
c1 A, c2 B, c3 C, c4 D, c5 E,
) {
Add4(p, e, c1, c2, c3, c4)
Add(p, e, c5)
}
// add 6 components to an entity
// automatically register component if ecs.AutoRegisterComponents
// is true (default)
// This is just a wrapper arround calling ecs.Add multiple times
func Add6[A any, B any, C any, D any, E any, F any](p *Pool, e Entity,
c1 A, c2 B, c3 C, c4 D, c5 E, c6 F,
) {
Add5(p, e, c1, c2, c3, c4, c5)
Add(p, e, c6)
}
// add 7 components to an entity
// automatically register component if ecs.AutoRegisterComponents
// is true (default)
// This is just a wrapper arround calling ecs.Add multiple times
func Add7[A any, B any, C any, D any, E any, F any, G any](p *Pool, e Entity,
c1 A, c2 B, c3 C, c4 D, c5 E, c6 F, c7 G,
) {
Add6(p, e, c1, c2, c3, c4, c5, c6)
Add(p, e, c7)
}
// add 8 components to an entity
// automatically register component if ecs.AutoRegisterComponents
// is true (default)
// This is just a wrapper arround calling ecs.Add multiple times
func Add8[A any, B any, C any, D any, E any, F any, G any, H any](p *Pool, e Entity,
c1 A, c2 B, c3 C, c4 D, c5 E, c6 F, c7 G, c8 H,
) {
Add7(p, e, c1, c2, c3, c4, c5, c6, c7)
Add(p, e, c8)
}
// add 9 components to an entity
// automatically register component if ecs.AutoRegisterComponents
// is true (default)
// This is just a wrapper arround calling ecs.Add multiple times
func Add9[A any, B any, C any, D any, E any, F any, G any, H any, I any](p *Pool, e Entity,
c1 A, c2 B, c3 C, c4 D, c5 E, c6 F, c7 G, c8 H, c9 I,
) {
Add8(p, e, c1, c2, c3, c4, c5, c6, c7, c8)
Add(p, e, c9)
}