mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-09 13:17:12 +08:00
feat(UI): 添加游戏开始界面和难度选择功能
实现游戏开始界面,包含难度选择滑块和开始按钮 修改游戏规则初始难度为10并调整掉落物品数量计算 添加游戏开始条件检查,确保运行时间超过3秒且没有敌人时显示制作饲料界面
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
@tool
|
||||
extends FullscreenPanelBase
|
||||
|
||||
@onready var diffEdit: HSlider = $"%diffEdit"
|
||||
@onready var startBtn: Button = $"%startBtn"
|
||||
@onready var levelShow: Label = $"%levelShow"
|
||||
|
||||
func _ready():
|
||||
startBtn.pressed.connect(
|
||||
func():
|
||||
Wave.next()
|
||||
UIState.closeCurrentPanel()
|
||||
)
|
||||
func _physics_process(_delta):
|
||||
levelShow.text = "%s/10" % diffEdit.value
|
||||
GameRule.difficulty = diffEdit.value
|
||||
Reference in New Issue
Block a user