Small clean up and win score set.
This commit is contained in:
@@ -6,6 +6,9 @@ import rl "vendor:raylib"
|
|||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
// LEVEL specifics
|
// LEVEL specifics
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
|
FIELD_BORDER :: 3
|
||||||
|
SERVE_WAIT_TIME :: 1.0
|
||||||
|
|
||||||
Level :: struct {
|
Level :: struct {
|
||||||
field_bounds: rl.Rectangle,
|
field_bounds: rl.Rectangle,
|
||||||
player: Entity,
|
player: Entity,
|
||||||
@@ -18,9 +21,6 @@ Level :: struct {
|
|||||||
score_win: int,
|
score_win: int,
|
||||||
}
|
}
|
||||||
|
|
||||||
FIELD_BORDER :: 3
|
|
||||||
SERVE_WAIT_TIME :: 1.0
|
|
||||||
|
|
||||||
init_level :: proc() -> Level {
|
init_level :: proc() -> Level {
|
||||||
// positions work off viewport resolution, independent of target display size
|
// positions work off viewport resolution, independent of target display size
|
||||||
// 10% padding around the field
|
// 10% padding around the field
|
||||||
@@ -49,9 +49,9 @@ init_level :: proc() -> Level {
|
|||||||
ball = init_ball(),
|
ball = init_ball(),
|
||||||
serve_timer = SERVE_WAIT_TIME,
|
serve_timer = SERVE_WAIT_TIME,
|
||||||
wait_time = SERVE_WAIT_TIME,
|
wait_time = SERVE_WAIT_TIME,
|
||||||
|
score_win = 1,
|
||||||
score_player = 0,
|
score_player = 0,
|
||||||
score_enemy = 0,
|
score_enemy = 0,
|
||||||
score_win = 2,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user