aboutsummaryrefslogtreecommitdiff
path: root/examples/game/box.tm
blob: dda3dd833d377c2cf4793271439f47d4bb96e0d0 (plain)
1
2
3
4
5
6
7
# Defines a struct representing boxes on the terrain
use ./world.tm
use ./raylib.tm

struct Box(pos:Vector2, size=Vector2(50, 50), color=Color(0x80,0x80,0x80)):
    func draw(b:Box):
        DrawRectangleV(b.pos, b.size, b.color)