1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-14 15:42:30 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Panels/Starter.gd
T

19 lines
536 B
GDScript
Raw Normal View History

@tool
extends FullscreenPanelBase
@onready var diffEdit: HSlider = $"%diffEdit"
@onready var startBtn: Button = $"%startBtn"
@onready var levelShow: Label = $"%levelShow"
func _ready():
diffEdit.min_value = GameRule.difficultyRange.x
diffEdit.max_value = GameRule.difficultyRange.y
startBtn.pressed.connect(
func():
Wave.next()
UIState.closeCurrentPanel()
)
func _physics_process(_delta):
levelShow.text = "%d ∈ [%d, %d]" % [diffEdit.value, diffEdit.min_value, diffEdit.max_value]
GameRule.difficulty = diffEdit.value