API Reference › Screen — drawing › Screen.sprite
method

Screen.sprite

Screen.sprite(id, x, y)

Draws sprite id from the loaded sprite sheet at (x, y), at its natural 16x16 size. Load the sheet once at start, then draw sprites each frame during Render.

Example

program Demo {
  handler DrawWorld phase Render {
    Screen.clear(Color.MidnightBlue)
    Screen.sprite(id: hero_frame, x: px, y: py)
    Screen.show()
  }
}
← All symbols