Draw text on screen.
The string to render
X position
Y position
Optional
Font size in pixels (default 16)
Text color options (r, g, b each 0-1)
sg.drawText('Score: 100', 10, 10, 24, { r: 1, g: 1, b: 1 }); Copy
sg.drawText('Score: 100', 10, 10, 24, { r: 1, g: 1, b: 1 });
Draw text on screen.