Documentation ¶
Overview ¶
Package generic contains Arche's generic API.
See the top level module github.com/mlange-42/arche for an overview.
Index ¶
- type Comp
- func T[A any]() Comp
- func T1[A any]() []Comp
- func T2[A any, B any]() []Comp
- func T3[A any, B any, C any]() []Comp
- func T4[A any, B any, C any, D any]() []Comp
- func T5[A any, B any, C any, D any, E any]() []Comp
- func T6[A any, B any, C any, D any, E any, F any]() []Comp
- func T7[A any, B any, C any, D any, E any, F any, G any]() []Comp
- func T8[A any, B any, C any, D any, E any, F any, G any, H any]() []Comp
- type Exchange
- type Filter0
- type Filter1
- type Filter2
- type Filter3
- func (q *Filter3[A, B, C]) Filter(w *ecs.World) ecs.MaskFilter
- func (q *Filter3[A, B, C]) Optional(mask ...Comp) *Filter3[A, B, C]
- func (q *Filter3[A, B, C]) Query(w *ecs.World) Query3[A, B, C]
- func (q *Filter3[A, B, C]) With(mask ...Comp) *Filter3[A, B, C]
- func (q *Filter3[A, B, C]) Without(mask ...Comp) *Filter3[A, B, C]
- type Filter4
- func (q *Filter4[A, B, C, D]) Filter(w *ecs.World) ecs.MaskFilter
- func (q *Filter4[A, B, C, D]) Optional(mask ...Comp) *Filter4[A, B, C, D]
- func (q *Filter4[A, B, C, D]) Query(w *ecs.World) Query4[A, B, C, D]
- func (q *Filter4[A, B, C, D]) With(mask ...Comp) *Filter4[A, B, C, D]
- func (q *Filter4[A, B, C, D]) Without(mask ...Comp) *Filter4[A, B, C, D]
- type Filter5
- func (q *Filter5[A, B, C, D, E]) Filter(w *ecs.World) ecs.MaskFilter
- func (q *Filter5[A, B, C, D, E]) Optional(mask ...Comp) *Filter5[A, B, C, D, E]
- func (q *Filter5[A, B, C, D, E]) Query(w *ecs.World) Query5[A, B, C, D, E]
- func (q *Filter5[A, B, C, D, E]) With(mask ...Comp) *Filter5[A, B, C, D, E]
- func (q *Filter5[A, B, C, D, E]) Without(mask ...Comp) *Filter5[A, B, C, D, E]
- type Filter6
- func (q *Filter6[A, B, C, D, E, F]) Filter(w *ecs.World) ecs.MaskFilter
- func (q *Filter6[A, B, C, D, E, F]) Optional(mask ...Comp) *Filter6[A, B, C, D, E, F]
- func (q *Filter6[A, B, C, D, E, F]) Query(w *ecs.World) Query6[A, B, C, D, E, F]
- func (q *Filter6[A, B, C, D, E, F]) With(mask ...Comp) *Filter6[A, B, C, D, E, F]
- func (q *Filter6[A, B, C, D, E, F]) Without(mask ...Comp) *Filter6[A, B, C, D, E, F]
- type Filter7
- func (q *Filter7[A, B, C, D, E, F, G]) Filter(w *ecs.World) ecs.MaskFilter
- func (q *Filter7[A, B, C, D, E, F, G]) Optional(mask ...Comp) *Filter7[A, B, C, D, E, F, G]
- func (q *Filter7[A, B, C, D, E, F, G]) Query(w *ecs.World) Query7[A, B, C, D, E, F, G]
- func (q *Filter7[A, B, C, D, E, F, G]) With(mask ...Comp) *Filter7[A, B, C, D, E, F, G]
- func (q *Filter7[A, B, C, D, E, F, G]) Without(mask ...Comp) *Filter7[A, B, C, D, E, F, G]
- type Filter8
- func (q *Filter8[A, B, C, D, E, F, G, H]) Filter(w *ecs.World) ecs.MaskFilter
- func (q *Filter8[A, B, C, D, E, F, G, H]) Optional(mask ...Comp) *Filter8[A, B, C, D, E, F, G, H]
- func (q *Filter8[A, B, C, D, E, F, G, H]) Query(w *ecs.World) Query8[A, B, C, D, E, F, G, H]
- func (q *Filter8[A, B, C, D, E, F, G, H]) With(mask ...Comp) *Filter8[A, B, C, D, E, F, G, H]
- func (q *Filter8[A, B, C, D, E, F, G, H]) Without(mask ...Comp) *Filter8[A, B, C, D, E, F, G, H]
- type Map
- type Map1
- type Map2
- func (m *Map2[A, B]) Add(entity ecs.Entity) (*A, *B)
- func (m *Map2[A, B]) Assign(entity ecs.Entity, a *A, b *B) (*A, *B)
- func (m *Map2[A, B]) Get(entity ecs.Entity) (*A, *B)
- func (m *Map2[A, B]) NewEntity() (ecs.Entity, *A, *B)
- func (m *Map2[A, B]) NewEntityWith(a *A, b *B) (ecs.Entity, *A, *B)
- func (m *Map2[A, B]) Remove(entity ecs.Entity)
- type Map3
- func (m *Map3[A, B, C]) Add(entity ecs.Entity) (*A, *B, *C)
- func (m *Map3[A, B, C]) Assign(entity ecs.Entity, a *A, b *B, c *C) (*A, *B, *C)
- func (m *Map3[A, B, C]) Get(entity ecs.Entity) (*A, *B, *C)
- func (m *Map3[A, B, C]) NewEntity() (ecs.Entity, *A, *B, *C)
- func (m *Map3[A, B, C]) NewEntityWith(a *A, b *B, c *C) (ecs.Entity, *A, *B, *C)
- func (m *Map3[A, B, C]) Remove(entity ecs.Entity)
- type Map4
- func (m *Map4[A, B, C, D]) Add(entity ecs.Entity) (*A, *B, *C, *D)
- func (m *Map4[A, B, C, D]) Assign(entity ecs.Entity, a *A, b *B, c *C, d *D) (*A, *B, *C, *D)
- func (m *Map4[A, B, C, D]) Get(entity ecs.Entity) (*A, *B, *C, *D)
- func (m *Map4[A, B, C, D]) NewEntity() (ecs.Entity, *A, *B, *C, *D)
- func (m *Map4[A, B, C, D]) NewEntityWith(a *A, b *B, c *C, d *D) (ecs.Entity, *A, *B, *C, *D)
- func (m *Map4[A, B, C, D]) Remove(entity ecs.Entity)
- type Map5
- func (m *Map5[A, B, C, D, E]) Add(entity ecs.Entity) (*A, *B, *C, *D, *E)
- func (m *Map5[A, B, C, D, E]) Assign(entity ecs.Entity, a *A, b *B, c *C, d *D, e *E) (*A, *B, *C, *D, *E)
- func (m *Map5[A, B, C, D, E]) Get(entity ecs.Entity) (*A, *B, *C, *D, *E)
- func (m *Map5[A, B, C, D, E]) NewEntity() (ecs.Entity, *A, *B, *C, *D, *E)
- func (m *Map5[A, B, C, D, E]) NewEntityWith(a *A, b *B, c *C, d *D, e *E) (ecs.Entity, *A, *B, *C, *D, *E)
- func (m *Map5[A, B, C, D, E]) Remove(entity ecs.Entity)
- type Map6
- func (m *Map6[A, B, C, D, E, F]) Add(entity ecs.Entity) (*A, *B, *C, *D, *E, *F)
- func (m *Map6[A, B, C, D, E, F]) Assign(entity ecs.Entity, a *A, b *B, c *C, d *D, e *E, f *F) (*A, *B, *C, *D, *E, *F)
- func (m *Map6[A, B, C, D, E, F]) Get(entity ecs.Entity) (*A, *B, *C, *D, *E, *F)
- func (m *Map6[A, B, C, D, E, F]) NewEntity() (ecs.Entity, *A, *B, *C, *D, *E, *F)
- func (m *Map6[A, B, C, D, E, F]) NewEntityWith(a *A, b *B, c *C, d *D, e *E, f *F) (ecs.Entity, *A, *B, *C, *D, *E, *F)
- func (m *Map6[A, B, C, D, E, F]) Remove(entity ecs.Entity)
- type Map7
- func (m *Map7[A, B, C, D, E, F, G]) Add(entity ecs.Entity) (*A, *B, *C, *D, *E, *F, *G)
- func (m *Map7[A, B, C, D, E, F, G]) Assign(entity ecs.Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G) (*A, *B, *C, *D, *E, *F, *G)
- func (m *Map7[A, B, C, D, E, F, G]) Get(entity ecs.Entity) (*A, *B, *C, *D, *E, *F, *G)
- func (m *Map7[A, B, C, D, E, F, G]) NewEntity() (ecs.Entity, *A, *B, *C, *D, *E, *F, *G)
- func (m *Map7[A, B, C, D, E, F, G]) NewEntityWith(a *A, b *B, c *C, d *D, e *E, f *F, g *G) (ecs.Entity, *A, *B, *C, *D, *E, *F, *G)
- func (m *Map7[A, B, C, D, E, F, G]) Remove(entity ecs.Entity)
- type Map8
- func (m *Map8[A, B, C, D, E, F, G, H]) Add(entity ecs.Entity) (*A, *B, *C, *D, *E, *F, *G, *H)
- func (m *Map8[A, B, C, D, E, F, G, H]) Assign(entity ecs.Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H) (*A, *B, *C, *D, *E, *F, *G, *H)
- func (m *Map8[A, B, C, D, E, F, G, H]) Get(entity ecs.Entity) (*A, *B, *C, *D, *E, *F, *G, *H)
- func (m *Map8[A, B, C, D, E, F, G, H]) NewEntity() (ecs.Entity, *A, *B, *C, *D, *E, *F, *G, *H)
- func (m *Map8[A, B, C, D, E, F, G, H]) NewEntityWith(a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H) (ecs.Entity, *A, *B, *C, *D, *E, *F, *G, *H)
- func (m *Map8[A, B, C, D, E, F, G, H]) Remove(entity ecs.Entity)
- type Query0
- type Query1
- type Query2
- type Query3
- type Query4
- type Query5
- type Query6
- type Query7
- type Query8
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comp ¶
Comp is an alias for component types.
type Exchange ¶
type Exchange struct {
// contains filtered or unexported fields
}
Exchange is a helper for adding, removing and exchanging components.
Set it up like this:
ex := NewExchange(&world). Adds(T3[A, B, C]()...). Removes(T2[D, E]()...)
For only adding or removing components, see also Map1, Map2 etc.
func NewExchange ¶
NewExchange creates a new Exchange object.
func (*Exchange) Add ¶
Add the components set via Exchange.Adds to the given entity.
See also ecs.World.Add.
func (*Exchange) Adds ¶
Adds sets components to add in calls to Exchange.Add and Exchange.Exchange.
Create the required mask items with T.
func (*Exchange) Exchange ¶
Exchange components on an entity.
Removes the components set via Exchange.Removes. Adds the components set via Exchange.Adds.
See also ecs.World.Exchange.
func (*Exchange) NewEntity ¶
NewEntity creates a new ecs.Entity with the components set via Exchange.Adds.
See also ecs.World.NewEntity.
func (*Exchange) Remove ¶
Remove the components set via Exchange.Removes from the given entity.
See also ecs.World.Remove.
func (*Exchange) Removes ¶
Removes sets components to remove in calls to Exchange.Remove and Exchange.Exchange.
Create the required mask items with T.
type Filter0 ¶
type Filter0 filter
Filter0 is a helper for building Query0 query iterators.
func NewFilter0 ¶
func NewFilter0() *Filter0
NewFilter0 creates a generic Filter0 for zero components.
See also ecs.World.Query.
func (*Filter0) Filter ¶
func (q *Filter0) Filter(w *ecs.World) ecs.MaskFilter
Filter generates and return the ecs.Filter used after Filter0.Query.
Can be passed to ecs.World.Query. For the intended generic use, however, generate a generic query with Filter0.Query.
type Filter1 ¶
type Filter1[A any] filter
Filter1 is a helper for building Query1 query iterators.
func NewFilter1 ¶
NewFilter1 creates a generic Filter1 for one components.
See also ecs.World.Query.
func (*Filter1[A]) Filter ¶
func (q *Filter1[A]) Filter(w *ecs.World) ecs.MaskFilter
Filter generates and return the ecs.Filter used after Filter1.Query.
Can be passed to ecs.World.Query. For the intended generic use, however, generate a generic query with Filter1.Query.
func (*Filter1[A]) Optional ¶
Optional makes some of the query's components optional.
Create the required mask items with T.
Only affects component types that were specified in the query.
func (*Filter1[A]) With ¶
With adds components that are required, but not accessible via Query1.Get.
Create the required mask items with T.
type Filter2 ¶
Filter2 is a helper for building Query2 query iterators.
func NewFilter2 ¶
NewFilter2 creates a generic Filter2 for two components.
See also ecs.World.Query.
func (*Filter2[A, B]) Filter ¶
func (q *Filter2[A, B]) Filter(w *ecs.World) ecs.MaskFilter
Filter generates and return the ecs.Filter used after Filter2.Query.
Can be passed to ecs.World.Query. For the intended generic use, however, generate a generic query with Filter2.Query.
func (*Filter2[A, B]) Optional ¶
Optional makes some of the query's components optional.
Create the required mask items with T.
Only affects component types that were specified in the query.
func (*Filter2[A, B]) With ¶
With adds components that are required, but not accessible via Query2.Get.
Create the required mask items with T.
type Filter3 ¶
Filter3 is a helper for building Query3 query iterators.
func NewFilter3 ¶
NewFilter3 creates a generic Filter3 for three components.
See also ecs.World.Query.
func (*Filter3[A, B, C]) Filter ¶
func (q *Filter3[A, B, C]) Filter(w *ecs.World) ecs.MaskFilter
Filter generates and return the ecs.Filter used after Filter3.Query.
Can be passed to ecs.World.Query. For the intended generic use, however, generate a generic query with Filter3.Query.
func (*Filter3[A, B, C]) Optional ¶
Optional makes some of the query's components optional.
Create the required mask items with T.
Only affects component types that were specified in the query.
func (*Filter3[A, B, C]) With ¶
With adds components that are required, but not accessible via Query3.Get.
Create the required mask items with T.
type Filter4 ¶
Filter4 is a helper for building Query4 query iterators.
func NewFilter4 ¶
NewFilter4 creates a generic Filter4 for four components.
See also ecs.World.Query.
func (*Filter4[A, B, C, D]) Filter ¶
func (q *Filter4[A, B, C, D]) Filter(w *ecs.World) ecs.MaskFilter
Filter generates and return the ecs.Filter used after Filter4.Query.
Can be passed to ecs.World.Query. For the intended generic use, however, generate a generic query with Filter4.Query.
func (*Filter4[A, B, C, D]) Optional ¶
Optional makes some of the query's components optional.
Create the required mask items with T.
Only affects component types that were specified in the query.
func (*Filter4[A, B, C, D]) With ¶
With adds components that are required, but not accessible via Query4.Get.
Create the required mask items with T.
type Filter5 ¶
Filter5 is a helper for building Query5 query iterators.
func NewFilter5 ¶
NewFilter5 creates a generic Filter5 for five components.
See also ecs.World.Query.
func (*Filter5[A, B, C, D, E]) Filter ¶
func (q *Filter5[A, B, C, D, E]) Filter(w *ecs.World) ecs.MaskFilter
Filter generates and return the ecs.Filter used after Filter5.Query.
Can be passed to ecs.World.Query. For the intended generic use, however, generate a generic query with Filter5.Query.
func (*Filter5[A, B, C, D, E]) Optional ¶
Optional makes some of the query's components optional.
Create the required mask items with T.
Only affects component types that were specified in the query.
func (*Filter5[A, B, C, D, E]) With ¶
With adds components that are required, but not accessible via Query5.Get.
Create the required mask items with T.
type Filter6 ¶
Filter6 is a helper for building Query6 query iterators.
func NewFilter6 ¶
NewFilter6 creates a generic Filter6 for six components.
See also ecs.World.Query.
func (*Filter6[A, B, C, D, E, F]) Filter ¶
func (q *Filter6[A, B, C, D, E, F]) Filter(w *ecs.World) ecs.MaskFilter
Filter generates and return the ecs.Filter used after Filter6.Query.
Can be passed to ecs.World.Query. For the intended generic use, however, generate a generic query with Filter6.Query.
func (*Filter6[A, B, C, D, E, F]) Optional ¶
Optional makes some of the query's components optional.
Create the required mask items with T.
Only affects component types that were specified in the query.
func (*Filter6[A, B, C, D, E, F]) With ¶
With adds components that are required, but not accessible via Query6.Get.
Create the required mask items with T.
type Filter7 ¶
Filter7 is a helper for building Query7 query iterators.
func NewFilter7 ¶
NewFilter7 creates a generic Filter7 for seven components.
See also ecs.World.Query.
func (*Filter7[A, B, C, D, E, F, G]) Filter ¶
func (q *Filter7[A, B, C, D, E, F, G]) Filter(w *ecs.World) ecs.MaskFilter
Filter generates and return the ecs.Filter used after Filter7.Query.
Can be passed to ecs.World.Query. For the intended generic use, however, generate a generic query with Filter7.Query.
func (*Filter7[A, B, C, D, E, F, G]) Optional ¶
Optional makes some of the query's components optional.
Create the required mask items with T.
Only affects component types that were specified in the query.
func (*Filter7[A, B, C, D, E, F, G]) With ¶
With adds components that are required, but not accessible via Query7.Get.
Create the required mask items with T.
type Filter8 ¶
Filter8 is a helper for building Query8 query iterators.
func NewFilter8 ¶
func NewFilter8[A any, B any, C any, D any, E any, F any, G any, H any]() *Filter8[A, B, C, D, E, F, G, H]
NewFilter8 creates a generic Filter8 for eight components.
See also ecs.World.Query.
func (*Filter8[A, B, C, D, E, F, G, H]) Filter ¶
func (q *Filter8[A, B, C, D, E, F, G, H]) Filter(w *ecs.World) ecs.MaskFilter
Filter generates and return the ecs.Filter used after Filter8.Query.
Can be passed to ecs.World.Query. For the intended generic use, however, generate a generic query with Filter8.Query.
func (*Filter8[A, B, C, D, E, F, G, H]) Optional ¶
Optional makes some of the query's components optional.
Create the required mask items with T.
Only affects component types that were specified in the query.
func (*Filter8[A, B, C, D, E, F, G, H]) With ¶
With adds components that are required, but not accessible via Query8.Get.
Create the required mask items with T.
type Map ¶
type Map[T any] struct { // contains filtered or unexported fields }
Map provides a type-safe way to access a component type by entity ID.
Create one with NewMap.
func NewMap ¶
NewMap creates a new Map for a component type.
Map provides a type-safe way to access a component type by entity ID.
See also ecs.World.Get, ecs.World.Has and ecs.World.Set.
type Map1 ¶
type Map1[A any] struct { // contains filtered or unexported fields }
Map1 is a helper for mapping one components.
func (*Map1[A]) Assign ¶
Assign the Map1's components to the given entity, using the supplied values.
See also ecs.World.Assign.
func (*Map1[A]) NewEntity ¶
NewEntity creates a new ecs.Entity with the Map1's components.
See also ecs.World.NewEntity.
func (*Map1[A]) NewEntityWith ¶
NewEntityWith creates a new ecs.Entity with the Map1's components, using the supplied values.
See also ecs.World.NewEntityWith.
type Map2 ¶
Map2 is a helper for mapping two components.
func (*Map2[A, B]) Assign ¶
Assign the Map2's components to the given entity, using the supplied values.
See also ecs.World.Assign.
func (*Map2[A, B]) Get ¶
Get all the Map2's components for the given entity.
See also ecs.World.Get.
func (*Map2[A, B]) NewEntity ¶
NewEntity creates a new ecs.Entity with the Map2's components.
See also ecs.World.NewEntity.
func (*Map2[A, B]) NewEntityWith ¶
NewEntityWith creates a new ecs.Entity with the Map2's components, using the supplied values.
See also ecs.World.NewEntityWith.
type Map3 ¶
Map3 is a helper for mapping three components.
func (*Map3[A, B, C]) Assign ¶
Assign the Map3's components to the given entity, using the supplied values.
See also ecs.World.Assign.
func (*Map3[A, B, C]) Get ¶
Get all the Map3's components for the given entity.
See also ecs.World.Get.
func (*Map3[A, B, C]) NewEntity ¶
NewEntity creates a new ecs.Entity with the Map3's components.
See also ecs.World.NewEntity.
func (*Map3[A, B, C]) NewEntityWith ¶
NewEntityWith creates a new ecs.Entity with the Map3's components, using the supplied values.
See also ecs.World.NewEntityWith.
type Map4 ¶
Map4 is a helper for mapping four components.
func (*Map4[A, B, C, D]) Add ¶
Add the Map4's components to the given entity.
See also ecs.World.Add.
func (*Map4[A, B, C, D]) Assign ¶
Assign the Map4's components to the given entity, using the supplied values.
See also ecs.World.Assign.
func (*Map4[A, B, C, D]) Get ¶
Get all the Map4's components for the given entity.
See also ecs.World.Get.
func (*Map4[A, B, C, D]) NewEntity ¶
NewEntity creates a new ecs.Entity with the Map4's components.
See also ecs.World.NewEntity.
func (*Map4[A, B, C, D]) NewEntityWith ¶
NewEntityWith creates a new ecs.Entity with the Map4's components, using the supplied values.
See also ecs.World.NewEntityWith.
type Map5 ¶
Map5 is a helper for mapping five components.
func (*Map5[A, B, C, D, E]) Add ¶
Add the Map5's components to the given entity.
See also ecs.World.Add.
func (*Map5[A, B, C, D, E]) Assign ¶
func (m *Map5[A, B, C, D, E]) Assign(entity ecs.Entity, a *A, b *B, c *C, d *D, e *E) (*A, *B, *C, *D, *E)
Assign the Map5's components to the given entity, using the supplied values.
See also ecs.World.Assign.
func (*Map5[A, B, C, D, E]) Get ¶
Get all the Map5's components for the given entity.
See also ecs.World.Get.
func (*Map5[A, B, C, D, E]) NewEntity ¶
NewEntity creates a new ecs.Entity with the Map5's components.
See also ecs.World.NewEntity.
func (*Map5[A, B, C, D, E]) NewEntityWith ¶
func (m *Map5[A, B, C, D, E]) NewEntityWith(a *A, b *B, c *C, d *D, e *E) (ecs.Entity, *A, *B, *C, *D, *E)
NewEntityWith creates a new ecs.Entity with the Map5's components, using the supplied values.
See also ecs.World.NewEntityWith.
type Map6 ¶
type Map6[A any, B any, C any, D any, E any, F any] struct { // contains filtered or unexported fields }
Map6 is a helper for mapping six components.
func (*Map6[A, B, C, D, E, F]) Add ¶
Add the Map6's components to the given entity.
See also ecs.World.Add.
func (*Map6[A, B, C, D, E, F]) Assign ¶
func (m *Map6[A, B, C, D, E, F]) Assign(entity ecs.Entity, a *A, b *B, c *C, d *D, e *E, f *F) (*A, *B, *C, *D, *E, *F)
Assign the Map6's components to the given entity, using the supplied values.
See also ecs.World.Assign.
func (*Map6[A, B, C, D, E, F]) Get ¶
Get all the Map6's components for the given entity.
See also ecs.World.Get.
func (*Map6[A, B, C, D, E, F]) NewEntity ¶
NewEntity creates a new ecs.Entity with the Map6's components.
See also ecs.World.NewEntity.
func (*Map6[A, B, C, D, E, F]) NewEntityWith ¶
func (m *Map6[A, B, C, D, E, F]) NewEntityWith(a *A, b *B, c *C, d *D, e *E, f *F) (ecs.Entity, *A, *B, *C, *D, *E, *F)
NewEntityWith creates a new ecs.Entity with the Map6's components, using the supplied values.
See also ecs.World.NewEntityWith.
type Map7 ¶
type Map7[A any, B any, C any, D any, E any, F any, G any] struct { // contains filtered or unexported fields }
Map7 is a helper for mapping seven components.
func NewMap7 ¶
func NewMap7[A any, B any, C any, D any, E any, F any, G any](w *ecs.World) Map7[A, B, C, D, E, F, G]
NewMap7 creates a new Map7 object.
func (*Map7[A, B, C, D, E, F, G]) Add ¶
Add the Map7's components to the given entity.
See also ecs.World.Add.
func (*Map7[A, B, C, D, E, F, G]) Assign ¶
func (m *Map7[A, B, C, D, E, F, G]) Assign(entity ecs.Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G) (*A, *B, *C, *D, *E, *F, *G)
Assign the Map7's components to the given entity, using the supplied values.
See also ecs.World.Assign.
func (*Map7[A, B, C, D, E, F, G]) Get ¶
Get all the Map7's components for the given entity.
See also ecs.World.Get.
func (*Map7[A, B, C, D, E, F, G]) NewEntity ¶
NewEntity creates a new ecs.Entity with the Map7's components.
See also ecs.World.NewEntity.
func (*Map7[A, B, C, D, E, F, G]) NewEntityWith ¶
func (m *Map7[A, B, C, D, E, F, G]) NewEntityWith(a *A, b *B, c *C, d *D, e *E, f *F, g *G) (ecs.Entity, *A, *B, *C, *D, *E, *F, *G)
NewEntityWith creates a new ecs.Entity with the Map7's components, using the supplied values.
See also ecs.World.NewEntityWith.
type Map8 ¶
type Map8[A any, B any, C any, D any, E any, F any, G any, H any] struct { // contains filtered or unexported fields }
Map8 is a helper for mapping eight components.
func NewMap8 ¶
func NewMap8[A any, B any, C any, D any, E any, F any, G any, H any](w *ecs.World) Map8[A, B, C, D, E, F, G, H]
NewMap8 creates a new Map8 object.
func (*Map8[A, B, C, D, E, F, G, H]) Add ¶
Add the Map8's components to the given entity.
See also ecs.World.Add.
func (*Map8[A, B, C, D, E, F, G, H]) Assign ¶
func (m *Map8[A, B, C, D, E, F, G, H]) Assign(entity ecs.Entity, a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H) (*A, *B, *C, *D, *E, *F, *G, *H)
Assign the Map8's components to the given entity, using the supplied values.
See also ecs.World.Assign.
func (*Map8[A, B, C, D, E, F, G, H]) Get ¶
Get all the Map8's components for the given entity.
See also ecs.World.Get.
func (*Map8[A, B, C, D, E, F, G, H]) NewEntity ¶
NewEntity creates a new ecs.Entity with the Map8's components.
See also ecs.World.NewEntity.
func (*Map8[A, B, C, D, E, F, G, H]) NewEntityWith ¶
func (m *Map8[A, B, C, D, E, F, G, H]) NewEntityWith(a *A, b *B, c *C, d *D, e *E, f *F, g *G, h *H) (ecs.Entity, *A, *B, *C, *D, *E, *F, *G, *H)
NewEntityWith creates a new ecs.Entity with the Map8's components, using the supplied values.
See also ecs.World.NewEntityWith.
type Query0 ¶
Query0 is a generic query iterator for zero components.
Create it with NewFilter0 and Filter0.Query.
Also has all methods of ecs.Query.
type Query1 ¶
Query1 is a generic query iterator for one components.
Create it with NewFilter1 and Filter1.Query.
Also has all methods of ecs.Query.
func (*Query1[A]) Get ¶
func (q *Query1[A]) Get() *A
Get returns all queried components for the current query iterator position.
Use ecs.Query.Entity to get the current Entity.
type Query2 ¶
Query2 is a generic query iterator for two components.
Create it with NewFilter2 and Filter2.Query.
Also has all methods of ecs.Query.
func (*Query2[A, B]) Get ¶
func (q *Query2[A, B]) Get() (*A, *B)
Get returns all queried components for the current query iterator position.
Use ecs.Query.Entity to get the current Entity.
type Query3 ¶
Query3 is a generic query iterator for three components.
Create it with NewFilter3 and Filter3.Query.
Also has all methods of ecs.Query.
func (*Query3[A, B, C]) Get ¶
func (q *Query3[A, B, C]) Get() (*A, *B, *C)
Get returns all queried components for the current query iterator position.
Use ecs.Query.Entity to get the current Entity.
type Query4 ¶
type Query4[A any, B any, C any, D any] struct { ecs.Query // contains filtered or unexported fields }
Query4 is a generic query iterator for four components.
Create it with NewFilter4 and Filter4.Query.
Also has all methods of ecs.Query.
func (*Query4[A, B, C, D]) Get ¶
func (q *Query4[A, B, C, D]) Get() (*A, *B, *C, *D)
Get returns all queried components for the current query iterator position.
Use ecs.Query.Entity to get the current Entity.
type Query5 ¶
type Query5[A any, B any, C any, D any, E any] struct { ecs.Query // contains filtered or unexported fields }
Query5 is a generic query iterator for five components.
Create it with NewFilter5 and Filter5.Query.
Also has all methods of ecs.Query.
func (*Query5[A, B, C, D, E]) Get ¶
func (q *Query5[A, B, C, D, E]) Get() (*A, *B, *C, *D, *E)
Get returns all queried components for the current query iterator position.
Use ecs.Query.Entity to get the current Entity.
type Query6 ¶
type Query6[A any, B any, C any, D any, E any, F any] struct { ecs.Query // contains filtered or unexported fields }
Query6 is a generic query iterator for six components.
Create it with NewFilter6 and Filter6.Query.
Also has all methods of ecs.Query.
func (*Query6[A, B, C, D, E, F]) Get ¶
func (q *Query6[A, B, C, D, E, F]) Get() (*A, *B, *C, *D, *E, *F)
Get returns all queried components for the current query iterator position.
Use ecs.Query.Entity to get the current Entity.
type Query7 ¶
type Query7[A any, B any, C any, D any, E any, F any, G any] struct { ecs.Query // contains filtered or unexported fields }
Query7 is a generic query iterator for seven components.
Create it with NewFilter7 and Filter7.Query.
Also has all methods of ecs.Query.
func (*Query7[A, B, C, D, E, F, G]) Get ¶
func (q *Query7[A, B, C, D, E, F, G]) Get() (*A, *B, *C, *D, *E, *F, *G)
Get returns all queried components for the current query iterator position.
Use ecs.Query.Entity to get the current Entity.
type Query8 ¶
type Query8[A any, B any, C any, D any, E any, F any, G any, H any] struct { ecs.Query // contains filtered or unexported fields }
Query8 is a generic query iterator for eight components.
Create it with NewFilter8 and Filter8.Query.
Also has all methods of ecs.Query.
func (*Query8[A, B, C, D, E, F, G, H]) Get ¶
func (q *Query8[A, B, C, D, E, F, G, H]) Get() (*A, *B, *C, *D, *E, *F, *G, *H)
Get returns all queried components for the current query iterator position.
Use ecs.Query.Entity to get the current Entity.