-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGetStorageMany.go
More file actions
99 lines (91 loc) · 2.78 KB
/
GetStorageMany.go
File metadata and controls
99 lines (91 loc) · 2.78 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
90
91
92
93
94
95
96
97
98
99
package ecs
// storage contains all components of a type
// This is just a wrapper arround calling ecs.GetStorage multiple times
func GetStorage2[A any, B any](p *Pool) (*Storage[A], *Storage[B]) {
return GetStorage[A](p),
GetStorage[B](p)
}
// storage contains all components of a type
// This is just a wrapper arround calling ecs.GetStorage multiple times
func GetStorage3[A any, B any, C any](p *Pool) (
*Storage[A], *Storage[B],
*Storage[C],
) {
a, b := GetStorage2[A, B](p)
c := GetStorage[C](p)
return a, b, c
}
// storage contains all components of a type
// This is just a wrapper arround calling ecs.GetStorage multiple times
func GetStorage4[A any, B any,
C any, D any](p *Pool) (
*Storage[A], *Storage[B],
*Storage[C], *Storage[D],
) {
a, b, c := GetStorage3[A, B, C](p)
d := GetStorage[D](p)
return a, b, c, d
}
// storage contains all components of a type
// This is just a wrapper arround calling ecs.GetStorage multiple times
func GetStorage5[A any, B any, C any,
D any, E any](p *Pool) (
*Storage[A], *Storage[B],
*Storage[C], *Storage[D],
*Storage[E],
) {
a, b, c, d := GetStorage4[A, B, C, D](p)
e := GetStorage[E](p)
return a, b, c, d, e
}
// storage contains all components of a type
// This is just a wrapper arround calling ecs.GetStorage multiple times
func GetStorage6[A any, B any, C any,
D any, E any, F any](p *Pool) (
*Storage[A], *Storage[B],
*Storage[C], *Storage[D],
*Storage[E], *Storage[F]) {
a, b, c, d, e := GetStorage5[A, B, C, D, E](p)
f := GetStorage[F](p)
return a, b, c, d, e, f
}
// storage contains all components of a type
// This is just a wrapper arround calling ecs.GetStorage multiple times
func GetStorage7[A any, B any, C any,
D any, E any, F any, G any](p *Pool) (
*Storage[A], *Storage[B],
*Storage[C], *Storage[D],
*Storage[E], *Storage[F],
*Storage[G],
) {
a, b, c, d, e, f := GetStorage6[A, B, C, D, E, F](p)
g := GetStorage[G](p)
return a, b, c, d, e, f, g
}
// storage contains all components of a type
// This is just a wrapper arround calling ecs.GetStorage multiple times
func GetStorage8[A any, B any, C any,
D any, E any, F any, G any, H any](p *Pool) (
*Storage[A], *Storage[B],
*Storage[C], *Storage[D],
*Storage[E], *Storage[F],
*Storage[G], *Storage[H],
) {
a, b, c, d, e, f, g := GetStorage7[A, B, C, D, E, F, G](p)
h := GetStorage[H](p)
return a, b, c, d, e, f, g, h
}
// storage contains all components of a type
// This is just a wrapper arround calling ecs.GetStorage multiple times
func GetStorage9[A any, B any, C any,
D any, E any, F any, G any, H any, I any](p *Pool) (
*Storage[A], *Storage[B],
*Storage[C], *Storage[D],
*Storage[E], *Storage[F],
*Storage[G], *Storage[H],
*Storage[I],
) {
a, b, c, d, e, f, g, h := GetStorage8[A, B, C, D, E, F, G, H](p)
i := GetStorage[I](p)
return a, b, c, d, e, f, g, h, i
}