What it does
draw.drawBox draws Box on a draw object. It takes x, y, x2, y2, r, g, b, r2, g2, b2 and filled. r2, g2, b2 and filled are optional.
Signature
draw.drawBox(x, y, x2, y2, r, g, b, r2?, g2?, b2?, filled?)Arguments
xyx2y2rgbr2optionalg2optionalb2optionalfilledoptional
Example · generated
function start() { draw.drawBox(100, 120, 100, 120, 1, 0.8, 0.4);}draw.drawBox 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.