Documentation ¶
Index ¶
- func MatchComponentMetaData(components []component.ComponentMetadata, cType component.ComponentMetadata) bool
- type ComponentFilter
- func All() ComponentFilter
- func And(filters ...ComponentFilter) ComponentFilter
- func Contains(components ...component.ComponentMetadata) ComponentFilter
- func Exact(components ...component.ComponentMetadata) ComponentFilter
- func Not(filter ComponentFilter) ComponentFilter
- func Or(filters ...ComponentFilter) ComponentFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchComponentMetaData ¶
func MatchComponentMetaData( components []component.ComponentMetadata, cType component.ComponentMetadata, ) bool
MatchComponentMetaData returns true if the given slice of components contains the given component. Components are the same if they have the same ID.
Types ¶
type ComponentFilter ¶
type ComponentFilter interface { // MatchesComponents returns true if the entity matches the filter. MatchesComponents(components []component.ComponentMetadata) bool }
ComponentFilter is a filter that filters entities based on their components.
func All ¶
func All() ComponentFilter
func And ¶
func And(filters ...ComponentFilter) ComponentFilter
func Contains ¶
func Contains(components ...component.ComponentMetadata) ComponentFilter
Contains matches archetypes that contain all the components specified.
func Exact ¶
func Exact(components ...component.ComponentMetadata) ComponentFilter
Exact matches archetypes that contain exactly the same components specified.
func Not ¶
func Not(filter ComponentFilter) ComponentFilter
func Or ¶
func Or(filters ...ComponentFilter) ComponentFilter
Source Files ¶
Click to show internal directories.
Click to hide internal directories.