What it does
sprite.load brings a sprite object into being: it is how the rest of the script comes to have one. It takes url, x and y. x and y are optional.
Signature
sprite.load(url, x?, y?)Arguments
urlxoptionalyoptional
Example · generated
function start() { sprite.load('/sprites/hero.png');}sprite.load is called with values of the shape its signature asks for. The code sits in start(), which the engine calls once, when the entity spawns.