tomo/examples/game/box.tm

8 lines
244 B
Plaintext
Raw 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
struct Box(pos:Vector2, size=Vector2(50, 50), color=Color(0x80,0x80,0x80), blocking=yes):
2024-09-08 17:25:06 -07:00
func draw(b:Box):
2025-03-11 15:02:13 -07:00
DrawRectangleV(b.pos, b.size, b.color)