Interface EnvironmentControl
- All Superinterfaces:
EnvironmentView
- All Known Implementing Classes:
Environment
Extends
EnvironmentView to provide full control over the environment.
EnvironmentControl allows updating the environment state, as well as adding or removing
entities from the environment. It builds on EnvironmentView, which provides
read-only access to environment data and services.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an entity to the environment.voidRemoves an entity from the environment.voidtick(float delta) Updates the environment state based on the elapsed time.Methods inherited from interface me.arcademadness.omni_dungeon.environment.EnvironmentView
despawn, getCollisionService, getEntities, getEventBus, getMap, getMovementService, spawn
-
Method Details
-
tick
void tick(float delta) Updates the environment state based on the elapsed time.This method is typically called once per game tick or frame to advance all simulations, such as entity movement, collisions, or environmental effects.
- Parameters:
delta- the time elapsed since the last update, in seconds- See Also:
-
addEntity
Adds an entity to the environment.After adding, the entity will be included in
EnvironmentView.getEntities().- Parameters:
e- theEntityto add- See Also:
-
removeEntity
Removes an entity from the environment.After removal, the entity will no longer appear in
EnvironmentView.getEntities().- Parameters:
e- theEntityto remove- See Also:
-