-
Notifications
You must be signed in to change notification settings - Fork 2
EntityManager
This class keeps track of all entities (classes derived from Entity). Anything in here will automatically be updated each step and be rendered if possible.
Class EntityManager
- getGameCamera
- addObject
- removeObjectByIndex
- removeObject
- getObjects
- addLight
- removeLightByIndex
- removeLight
- getLights
- setPhysicsTimePerStep
- getPhysicsTimePerStep
Camera& getGameCamera()
Get the camera displaying on the screen.
bool addObject(Object& object)
Add an object to the manager. It will not be copied, but of course you don't need to worry about deconstructing from Lua while it is in the entity manager. Returns false on failure.
Remove an object from the manager. The index is 0-based! Returns a reference to the removed object.
bool removeObject(Object&)
Remove an object. Returns false on failure.
{Object}& getObjects()
Get an array of all objects.
bool addLight(Light& light)
Add a light to the manager. It will not be copied, but of course you don't need to worry about deconstructing from Lua while it is in the entity manager. Returns false on failure.
Remove a light from the manager. The index is 0-based! Returns a reference to the removed light.
bool removeLight(Light&)
Remove an light. Returns false on failure.
{Light}& getLights()
Get an array of all lights.
Set the number of seconds elapsed per frame. Useful for slow motion or speeding up everything. Only affects physics!
Get the number of seconds elapsing per frame in the physics engine.
- Understanding the Lua API reference
- Tutorial
- Units
- Notes
- Lua API reference
- Callbacks
- Global
- Game
- Engine
- ResourceManager
- Shader
- Texture
- TextureType
- ObjectGeometryGroup
- ObjectGeometry
- Sound
- SoundType
- GPUBuffer_uint
- GPUBuffer_vec2
- GPUBuffer_vec3
- InputManager
- KeyCode
- EntityManager
- Entity
- PhysicsBody
- PhysicsBodyType
- Camera
- Object
- TexturedObject
- ShadedObject
- Light
- GraphicsManager
- Utils
- IVec2
- Vec2
- Vec3
- Vec4