diff options
Diffstat (limited to 'examples/game/box.tm')
| -rw-r--r-- | examples/game/box.tm | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/game/box.tm b/examples/game/box.tm index acff269e..03294a0a 100644 --- a/examples/game/box.tm +++ b/examples/game/box.tm @@ -1,9 +1,7 @@ # Defines a struct representing boxes on the terrain -use vectors - use ./world.tm -use ./color.tm +use ./raylib.tm -struct Box(pos:Vec2, size=Vec2(50, 50), color=Color.GRAY, blocking=yes): +struct Box(pos:Vector2, size=Vector2(50, 50), color=Color(0x80,0x80,0x80), blocking=yes): func draw(b:Box): - b.color:draw_rectangle(b.pos, b.size) + DrawRectangleRec(Rectangle(b.pos.x, b.pos.y, b.size.x, b.size.y), b.color) |
