mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 08:21:54 +08:00
refactor(Statemachine): 使用GameRule配置物品展示停留时间
将ItemShow中的硬编码等待时间改为使用GameRule.itemShowStayTime配置
This commit is contained in:
@@ -12,7 +12,7 @@ class_name ItemShow
|
||||
|
||||
func _ready():
|
||||
if autoFree:
|
||||
await TickTool.millseconds(2000) # 等待1秒后自动隐藏
|
||||
await TickTool.millseconds(GameRule.itemShowStayTime) # 等待几秒后自动隐藏
|
||||
animator.play("hide")
|
||||
await animator.animation_finished
|
||||
queue_free()
|
||||
|
||||
@@ -7,4 +7,5 @@ static var damageLabelSpawnOffset: float = 10 # 伤害标签生成位置的随
|
||||
static var itemDroppedSpawnOffset: float = 30 # 掉落物生成位置的随机偏移
|
||||
static var appleDropRate: float = 0.1 # 苹果掉落概率
|
||||
static var refreshCountIncreasePercent: Vector2 = Vector2(0.4, 1.1) # 刷新所需的棒球数量的增加的百分比,随机,默认为40%~110%
|
||||
static var entityCountBoostPerWave: float = 0.1 # 每波敌人数量增加的百分比,倍数级
|
||||
static var entityCountBoostPerWave: float = 0.1 # 每波敌人数量增加的百分比,倍数级
|
||||
static var itemShowStayTime: int = 1500 # 物品展示组件如果设置了自动隐藏,那么隐藏前可以存活的时间
|
||||
Reference in New Issue
Block a user