Added compile time vars for consistency.
This commit is contained in:
@@ -6,14 +6,16 @@ import rl "vendor:raylib"
|
||||
|
||||
SPEED_INC :: 30
|
||||
EFFECTS_SPEED :: 300
|
||||
INITIAL_SPEED :: 200
|
||||
MAX_SPEED :: 550
|
||||
|
||||
init_ball :: proc() -> Entity {
|
||||
return Entity{
|
||||
type = .Ball,
|
||||
active = true,
|
||||
pos = rl.Vector2{(VIEWPORT_W / 2), (VIEWPORT_H / 2)},
|
||||
speed = 200,
|
||||
max_speed = 550,
|
||||
speed = INITIAL_SPEED,
|
||||
max_speed = MAX_SPEED,
|
||||
vel = rl.Vector2{0,0},
|
||||
shape = .Circle,
|
||||
size = rl.Vector2{8, 0},
|
||||
@@ -35,7 +37,7 @@ serve_ball :: proc(ball: ^Entity, serve_dir: u8) {
|
||||
reset_ball :: proc(ball: ^Entity) {
|
||||
ball.pos = rl.Vector2{(VIEWPORT_W / 2), (VIEWPORT_H / 2)}
|
||||
ball.vel = rl.Vector2{0,0}
|
||||
ball.speed = 300
|
||||
ball.speed = INITIAL_SPEED
|
||||
ball.trail_positions = {}
|
||||
ball.trail_count = 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user