WorldController
class WorldController
The WorldController class is responsible to manage the current world, like getting all objects, getting the world load status, etc.
public class WorldController
— Methods (15) —
| Name | Description |
|---|---|
| void loadWorld(WorldFile worldFile) | This method load a world from a WorldFile. |
| SpatialObject findObject(String name) | This method searches an object and if it exist, will return it, otherwise will return NULL. |
| ArrayList getObjectList() | This method return a ArrayList\<SpatialObject> containing all objects from the current world. |
| int getObjectsCount() | This method return the object count in the current world. |
| SpatialObject getObject(int index) | This method return an object on the current world at index index, if doesn't exist return NULL. |
| List\<Component> listAllComponents(String tittle) | This method return all components from all objects where the name is equal to tittle. |
| List\<Component> listAllComponents([Class] classReference) | This method return all components from all objects where the component class is equal to classReference. |
| float getLoadPercent() | This method return the current world loading progress in percentage. |
| float getLoadProgress() | This method return the current world loading progress. |
| int getLoadedCount() | This method return the count of loaded objects in the world. |
| int getLoadTotal() | This method return the count of maximum objects to load in the world. |
| boolean isLoaded() | This method return true if the world is loading. |
| LightSettings getLightSettings() | This method return the current world LightSettings. |
| [PhysicsSettings] getPhysicsSettings() | This method return the current world [PhysicsSettings]. |
| WorldPathFinder getPathFinder() | This method return the world WorldPathFinder. |
— Static Methods (7) —
| Name | Description |
|---|---|
| void loadWorldAsync(WorldFile worldFile) | This method loads a world from a WorldFile parallel to the current world. |
| String getLoadMessage() | Returns a String with elements loaded from the world. |
| SpatialObject findObjectWithTag(String tagName) | Returns a SpatialObject with the tag defined to be "tagName" argument. |
| List\<SpatialObject> findObjectsWithTag(String tagName) | Returns a list of all SpatialObject with the tag defined to be "tagName" argument. |
| SpatialObject findRandomObjectWithTag(String tagName) | Returns a random SpatialObject with the tag defined to be "tagName" argument. |
| int countObjectsWithTag(String tagName) | Returns an int with the amount of SpatialObject with the tag defined to be "tagName" argument. |
| boolean hasObjectsWithTag(String tagName) | Returns true if a SpatialObject has the tag defined to be "tagName" argument. |