2025-09-12 22:08:55 +08:00
|
|
|
@tool
|
|
|
|
|
extends FullscreenPanelBase
|
|
|
|
|
|
|
|
|
|
@onready var diffEdit: HSlider = $"%diffEdit"
|
|
|
|
|
@onready var startBtn: Button = $"%startBtn"
|
|
|
|
|
@onready var levelShow: Label = $"%levelShow"
|
|
|
|
|
|
|
|
|
|
func _ready():
|
2025-11-09 11:34:46 +08:00
|
|
|
diffEdit.min_value = GameRule.difficultyRange.x
|
|
|
|
|
diffEdit.max_value = GameRule.difficultyRange.y
|
2025-09-12 22:08:55 +08:00
|
|
|
startBtn.pressed.connect(
|
|
|
|
|
func():
|
|
|
|
|
Wave.next()
|
|
|
|
|
UIState.closeCurrentPanel()
|
|
|
|
|
)
|
|
|
|
|
func _physics_process(_delta):
|
2025-11-05 22:29:11 +08:00
|
|
|
levelShow.text = "%d ∈ [%d, %d]" % [diffEdit.value, diffEdit.min_value, diffEdit.max_value]
|
2025-09-12 22:08:55 +08:00
|
|
|
GameRule.difficulty = diffEdit.value
|