Class Environment
java.lang.Object
me.arcademadness.omni_dungeon.environment.Environment
- All Implemented Interfaces:
EnvironmentControl,EnvironmentView
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an entity to the environment.voidDespawns an entity from the environment.Returns the collision service responsible for handling entity collisions.Returns a list of entities currently present in the environment.Returns the event bus used for broadcasting and listening to game events.getMap()Returns the tile map representing the environment's layout.Returns the movement service responsible for moving entities in the environment.voidremoveEntity(Entity entity) Removes an entity from the environment.voidSpawns an entity at the specified location in the environment.voidtick(float delta) Updates the environment state based on the elapsed time.
-
Constructor Details
-
Environment
-
-
Method Details
-
getMap
Description copied from interface:EnvironmentViewReturns the tile map representing the environment's layout.- Specified by:
getMapin interfaceEnvironmentView- Returns:
- the
TileMapof the environment - See Also:
-
getEntities
Description copied from interface:EnvironmentViewReturns a list of entities currently present in the environment.- Specified by:
getEntitiesin interfaceEnvironmentView- Returns:
- a
ListofEntityobjects - See Also:
-
getCollisionService
Description copied from interface:EnvironmentViewReturns the collision service responsible for handling entity collisions.- Specified by:
getCollisionServicein interfaceEnvironmentView- Returns:
- the
CollisionServicefor the environment
-
getMovementService
Description copied from interface:EnvironmentViewReturns the movement service responsible for moving entities in the environment.- Specified by:
getMovementServicein interfaceEnvironmentView- Returns:
- the
MovementServicefor the environment
-
getEventBus
Description copied from interface:EnvironmentViewReturns the event bus used for broadcasting and listening to game events.- Specified by:
getEventBusin interfaceEnvironmentView- Returns:
- the
EventBusof the environment
-
spawn
Description copied from interface:EnvironmentViewSpawns an entity at the specified location in the environment.After spawning, the entity will appear in
EnvironmentView.getEntities().- Specified by:
spawnin interfaceEnvironmentView- Parameters:
entity- theEntityto spawnlocation- theLocationat which to spawn the entity- See Also:
-
addEntity
Description copied from interface:EnvironmentControlAdds an entity to the environment.After adding, the entity will be included in
EnvironmentView.getEntities().- Specified by:
addEntityin interfaceEnvironmentControl- Parameters:
e- theEntityto add- See Also:
-
despawn
Description copied from interface:EnvironmentViewDespawns an entity from the environment.After despawning, the entity will no longer appear in
EnvironmentView.getEntities().- Specified by:
despawnin interfaceEnvironmentView- Parameters:
entity- theEntityto remove- See Also:
-
removeEntity
Description copied from interface:EnvironmentControlRemoves an entity from the environment.After removal, the entity will no longer appear in
EnvironmentView.getEntities().- Specified by:
removeEntityin interfaceEnvironmentControl- Parameters:
entity- theEntityto remove- See Also:
-
tick
public void tick(float delta) Description copied from interface:EnvironmentControlUpdates 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.
- Specified by:
tickin interfaceEnvironmentControl- Parameters:
delta- the time elapsed since the last update, in seconds- See Also:
-