| Package | Description |
|---|---|
| com.almasb.fxgl.ecs | |
| com.almasb.fxgl.ecs.component | |
| com.almasb.fxgl.entity | |
| com.almasb.fxgl.entity.component | |
| com.almasb.fxgl.physics | |
| com.almasb.fxgl.scene |
| Modifier and Type | Interface and Description |
|---|---|
interface |
CopyableComponent<T extends Component>
Marks a component as copyable.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Component> |
Entity.getComponent(Class<T> type)
Returns component of given type, or null if type not registered.
|
<T extends Component> |
Entity.getComponentOptional(Class<T> type)
Returns component of given type, or
Optional.empty()
if type not registered. |
| Modifier and Type | Method and Description |
|---|---|
Array<Component> |
Entity.getComponents()
Warning: object allocation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Entity.addComponent(Component component)
Adds given component to this entity.
|
default void |
ModuleListener.onAdded(Component component) |
default void |
ModuleListener.onRemoved(Component component) |
| Modifier and Type | Method and Description |
|---|---|
List<Entity> |
GameWorld.getEntitiesByComponent(Class<? extends Component> type) |
boolean |
Entity.hasComponent(Class<? extends Component> type) |
boolean |
Entity.removeComponent(Class<? extends Component> type)
Remove a component with given type from this entity.
|
| Modifier and Type | Class and Description |
|---|---|
class |
BooleanComponent
Represents a boolean value based component.
|
class |
DoubleComponent
Represents a double value based component.
|
class |
IntegerComponent
Represents an int value based component.
|
class |
ObjectComponent<T> |
class |
StringComponent
Represents a String value based component.
|
class |
UserDataComponent
Can be used to store user specific data to add as component
to an entity.
|
| Modifier and Type | Method and Description |
|---|---|
Entities.GameEntityBuilder |
Entities.GameEntityBuilder.with(Component... components) |
| Modifier and Type | Class and Description |
|---|---|
class |
BoundingBoxComponent
Component that adds bounding box information to an entity.
|
class |
CollidableComponent
Marks an entity as collidable.
|
class |
DrawableComponent
Allows drawing directly to graphics context.
|
class |
HealthComponent
Represents some form of entity health based on integer values.
|
class |
IDComponent
Adds ID to an entity, so it can be uniquely identified.
|
class |
PositionComponent
Component that adds a 2d position to an entity.
|
class |
RechargeableComponent
Any rechargeable component, such as HP, SP, ammo, etc.
|
class |
RotationComponent
Adds rotation data to an entity.
|
class |
SelectableComponent
Marks an entity as selectable.
|
class |
TypeComponent
Represents an entity type.
|
class |
ViewComponent
Adds a game scene view to an entity.
|
| Modifier and Type | Class and Description |
|---|---|
class |
PhysicsComponent
Adds physics properties to an entity.
|
class |
PhysicsParticleComponent
Adds physics particle properties to an entity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
GameScene.onAdded(Component component) |
void |
GameScene.onRemoved(Component component) |
Copyright © 2017. All rights reserved.