diff --git a/scripts/Statemachine/ItemShow.gd b/scripts/Statemachine/ItemShow.gd index 3ca74fb..ed3e206 100644 --- a/scripts/Statemachine/ItemShow.gd +++ b/scripts/Statemachine/ItemShow.gd @@ -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() diff --git a/scripts/Tools/GameRule.gd b/scripts/Tools/GameRule.gd index 8884305..5998ecc 100644 --- a/scripts/Tools/GameRule.gd +++ b/scripts/Tools/GameRule.gd @@ -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 # 每波敌人数量增加的百分比,倍数级 \ No newline at end of file +static var entityCountBoostPerWave: float = 0.1 # 每波敌人数量增加的百分比,倍数级 +static var itemShowStayTime: int = 1500 # 物品展示组件如果设置了自动隐藏,那么隐藏前可以存活的时间 \ No newline at end of file