1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-12 06:37:13 +08:00

feat(UI): 添加游戏开始界面和难度选择功能

实现游戏开始界面,包含难度选择滑块和开始按钮
修改游戏规则初始难度为10并调整掉落物品数量计算
添加游戏开始条件检查,确保运行时间超过3秒且没有敌人时显示制作饲料界面
This commit is contained in:
2025-09-12 22:08:55 +08:00
parent 90f7f28649
commit 3171c39915
7 changed files with 83 additions and 7 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
class_name GameRule
static var deadReasons: Array = JsonTool.parseJson("res://resources/constants/deadReasons.json")
static var difficulty: float = 1 # 难度倍数,可以写小数
static var difficulty: float = 10 # 难度倍数,可以写小数
static var allowFriendlyFire: bool = false # 是否允许友军伤害
static var bulletSpeedMultiplier: float = 1 # 子弹速度倍率
static var damageOffset: float = MathTool.percent(20) # 伤害随机浮动比例
+1 -2
View File
@@ -8,10 +8,9 @@ static var runningTime: int = 0
func _ready():
tree = get_tree()
rootNode = self
print(GameRule.deadReasons)
func _physics_process(delta):
runningTime += delta * 1000
if EntityBase.mobCount() == 0:
if EntityBase.mobCount() == 0 and runningTime > 3000:
UIState.setPanel("MakeFeed")
static func getTime():