|
@@ -10,10 +10,13 @@ var _rings: Array[Node2D] = []
|
|
|
var _speeds: Array[float] = []
|
|
var _speeds: Array[float] = []
|
|
|
|
|
|
|
|
|
|
|
|
|
-func build(level: int) -> void:
|
|
|
|
|
|
|
+## Builds the level's rings. Rings are made thinner when needed so they all fit within
|
|
|
|
|
+## [param max_radius]; the ring count, and so the difficulty, stays the same.
|
|
|
|
|
+func build(level: int, max_radius: float) -> void:
|
|
|
var layout := _layout(level)
|
|
var layout := _layout(level)
|
|
|
|
|
+ var size := minf(layout.size, (max_radius - Params.CORE_RADIUS) / layout.rings)
|
|
|
for index in range(layout.rings - 1, -1, -1):
|
|
for index in range(layout.rings - 1, -1, -1):
|
|
|
- _add_ring(layout.size, index, layout.indestructible_chance)
|
|
|
|
|
|
|
+ _add_ring(size, index, layout.indestructible_chance)
|
|
|
core = Core.new()
|
|
core = Core.new()
|
|
|
add_child(core)
|
|
add_child(core)
|
|
|
|
|
|