Package dev.prozilla.pine.core.component
Class ComponentManager
java.lang.Object
dev.prozilla.pine.core.ECSManager
dev.prozilla.pine.core.component.ComponentManager
- All Implemented Interfaces:
Lifecycle
-
Field Summary
Fields inherited from class dev.prozilla.pine.core.ECSManager
world
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addComponent
(Entity entity, Component component) void
destroy()
Destroys the object at the end of the game loop.static int
Generates a new unique component ID.void
removeComponent
(Entity entity, Component component) void
removeComponents
(Entity entity) Methods inherited from class dev.prozilla.pine.core.ECSManager
getTracker
-
Constructor Details
-
Method Details
-
destroy
public void destroy()Description copied from interface:Lifecycle
Destroys the object at the end of the game loop. -
addComponent
public void addComponent(Entity entity, Component component) throws NullPointerException, IllegalStateException -
removeComponents
-
removeComponent
-
generateComponentId
public static int generateComponentId()Generates a new unique component ID.- Returns:
- Component ID
-