Package tripleplay.entity
Class Component
java.lang.Object
tripleplay.entity.Component
- Direct Known Subclasses:
Component.FScalar
,Component.Generic
,Component.IMask
,Component.IScalar
,Component.XY
A component contains the data for a single aspect of an entity. This might be its position in a
2D space, or its animation state, or any other piece of data that evolves as the entity exists
in the world.
A Component
instance contains the data for all entities that possess the
component in question (in a sparse array). This enables a data-driven approach to entity
processing where a system can process one or more components for its active entities with a
cache-friendly memory access pattern.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A component implementation for a single scalarfloat
.static final class
A component implementation for arbitrary objects.static final class
A component implementation for a singleint
bit mask.static final class
A component implementation for a single scalarint
.static final class
A component implementation for a pair offloat
s. -
Field Summary
-
Method Summary