Package fr.phylisiumstudio.logic
Class WorldManager
java.lang.Object
fr.phylisiumstudio.logic.WorldManager
Manage the worlds and the threads associated with them
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the world physics associated with the worldGet all the worlds being managedboolean
isWorldRegistered
(UUID worldId) Check if a world is registeredvoid
registerWorld
(WorldPhysics world) Register a world with the physics enginevoid
shutdown()
Shutdown the world managervoid
startWorldPhysics
(WorldPhysics worldPhysics) Start the physics for a worldvoid
unregisterWorld
(WorldPhysics world) Unregister a world from the physics engine
-
Constructor Details
-
WorldManager
public WorldManager()
-
-
Method Details
-
registerWorld
Register a world with the physics engine- Parameters:
world
- The world to register
-
unregisterWorld
Unregister a world from the physics engine- Parameters:
world
- The world to unregister
-
startWorldPhysics
Start the physics for a world- Parameters:
worldPhysics
- The world physics
-
getWorld
Get the world physics associated with the world- Parameters:
worldId
- The world id- Returns:
- The world physics
-
isWorldRegistered
Check if a world is registered- Parameters:
worldId
- The world id- Returns:
- True if the world is registered
-
shutdown
public void shutdown()Shutdown the world manager -
getPhysicsThreadManager
-
getWorlds
Get all the worlds being managed- Returns:
- a copy of the worlds
-