What it does
game.getEntity reads Entity on a game object. It takes id.
Signature
game.getEntity(id)Arguments
id
Example · generated
function update(dt) { const entity = game.getEntity('main');}game.getEntity is called with values of the shape its signature asks for. The code sits in update(dt), which the engine calls every frame: dt is the time since the last one, in seconds.