feat: Add increasing dimensions on stage clear
This commit is contained in:
parent
eba0831690
commit
63395dd5cb
6
level.gd
6
level.gd
|
|
@ -1,7 +1,9 @@
|
||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
||||||
@export var dimension: int = 5
|
const BASE_DIMENSION: int = 2
|
||||||
|
|
||||||
@export var path_count: int = 5
|
@export var path_count: int = 5
|
||||||
|
var dimension: int = BASE_DIMENSION
|
||||||
|
|
||||||
@export var ped_spawn_rate: int = 20
|
@export var ped_spawn_rate: int = 20
|
||||||
|
|
||||||
|
|
@ -36,6 +38,8 @@ func _ready() -> void:
|
||||||
initialize_world()
|
initialize_world()
|
||||||
|
|
||||||
func initialize_world() -> void:
|
func initialize_world() -> void:
|
||||||
|
dimension = BASE_DIMENSION + $Player.stage_counter
|
||||||
|
|
||||||
# ---- Decide position of Spawn & Station ----
|
# ---- Decide position of Spawn & Station ----
|
||||||
var station = Vector2i(randi() % dimension, 0)
|
var station = Vector2i(randi() % dimension, 0)
|
||||||
var spawn = Vector2i(dimension - station.x - 1, dimension - 1)
|
var spawn = Vector2i(dimension - station.x - 1, dimension - 1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue