ammo is the main module which manages, mainly there to manage the current world. The table itself and
ammo.path are defined in
init.lua, while the rest of its functionality is defined in
core/init.lua is imported directly, without
init.lua, it will define
This is the world that
ammo.world will default to if it is set to
nil. This is by default a blank world created via
World:new(). If you set this to
nil, Ammo will set it to a new blank world.
A table with which extensions can indicate they are loaded. For example, ammo-physics would set
The package path specifying where Ammo is located, relative to your game's path. This is used internally to load the other files in the library.
The currently active game world, which must be an instance of
[[World]]. If this is set to
nil, it will default to
ammo.default. When you set this, the world (and thus the actual value of
ammo.world) isn't actually changed until the next frame.
Calls the current world's draw callback. If you haven't already defined
love.draw, Ammo will set it to this function (as in,
love.draw = ammo.draw). If you do need to define a custom
love.draw, remember to call
ammo.draw inside it.
Updates the value of
ammo.world, if needed, and calls the current world's update callback. The same information from
ammo.draw applies to this function, except it's with
dt: The delta time.