separate out render methods

This commit is contained in:
2026-06-13 23:46:51 -07:00
parent b9235246c7
commit 042fc9fe62
4 changed files with 45 additions and 35 deletions
+10
View File
@@ -1,5 +1,7 @@
package game
import rl "vendor:raylib"
Projectile :: struct {
active: bool,
position: Vec2,
@@ -65,3 +67,11 @@ update_projectiles :: proc(world: ^World, dt: f32) {
}
}
render_projectiles :: proc(world: ^World) {
for i in 0 ..< MAX_PROJECTILES {
p := world.projectiles[i]
if !p.active do continue
rl.DrawCircle(i32(p.position.x), i32(p.position.y), 4, rl.GOLD)
}
}