tomo/examples/game/box.tm

8 lines
228 B
Plaintext
Raw Permalink Normal View History

2024-09-08 16:49:47 -07:00
# Defines a struct representing boxes on the terrain
use ./world.tm
use ./raylib.tm
2024-09-08 16:49:47 -07:00
2025-04-06 13:07:23 -07:00
struct Box(pos:Vector2, size=Vector2(50, 50), color=Color(0x80,0x80,0x80))
func draw(b:Box)
2025-03-11 15:02:13 -07:00
DrawRectangleV(b.pos, b.size, b.color)