What it does
sprite.getHit reads Hit on a sprite object. It takes x and y.
Signature
sprite.getHit(x, y)Arguments
xy
Example · generated
function update(dt) { const hit = sprite.getHit(100, 120);}sprite.getHit 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.