separate out render methods
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user