separate out render methods
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package game
|
||||
|
||||
import rl "vendor:raylib"
|
||||
|
||||
Tower :: struct {
|
||||
position: Vec2,
|
||||
kind: Tower_Kind,
|
||||
@@ -81,3 +83,15 @@ update_towers :: proc(world: ^World, dt: f32) {
|
||||
}
|
||||
}
|
||||
|
||||
render_towers :: proc(world: ^World) {
|
||||
for t in world.towers {
|
||||
rl.DrawRectangle(
|
||||
i32(t.position.x - 14),
|
||||
i32(t.position.y - 14),
|
||||
28,
|
||||
28,
|
||||
rl.Color{255, 203, 0, 255},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user