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

fix(UI): 修正ColorBar默认值和DamageLabel文本显示

refactor(Bullets): 调整BigLaser和Diamond的旋转插值系数
feat(EntityBase): 添加掉落物提示概率控制
style(BossBar): 添加currentValue默认值和label对齐方式
docs(GameRule): 新增掉落物提示概率配置项
This commit is contained in:
2025-08-28 08:22:13 +08:00
parent 307e3dd63f
commit 4c077af28d
7 changed files with 11 additions and 6 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ extends BulletBase
class_name BigLaser
func ai():
rotation = lerp_angle(rotation, ((get_global_mouse_position() - position).angle()), 0.05)
rotation = lerp_angle(rotation, ((get_global_mouse_position() - position).angle()), 0.15)
position = launcher.texture.global_position
func applyDot():
hitbox.disabled = true
+1 -1
View File
@@ -4,6 +4,6 @@ class_name Diamond
const traceTime = 2000
func ai():
rotation = lerp_angle(rotation, position.angle_to_point(launcher.currentFocusedBoss.position), 0.2 * clamp((traceTime - timeLived()) / traceTime, 0, INF))
rotation = lerp_angle(rotation, position.angle_to_point(launcher.currentFocusedBoss.position), 0.15 * clamp((traceTime - timeLived()) / traceTime, 0, INF))
canDamageSelf = !(timeLived() >= traceTime)
forward(Vector2.from_angle(rotation))
+2 -1
View File
@@ -90,7 +90,8 @@ func _ready():
)
itemCollected.connect(
func(itemType, amount):
UIState.itemCollect.add_child(ItemShow.generate(itemType, amount, true))
if MathTool.rate(GameRule.tipSpawnRateWhenGetDroppedItem):
UIState.itemCollect.add_child(ItemShow.generate(itemType, amount, true))
)
else:
currentFocusedBoss = get_tree().get_nodes_in_group("players")[0]
+2 -1
View File
@@ -8,4 +8,5 @@ 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 itemShowStayTime: int = 1500 # 物品展示组件如果设置了自动隐藏,那么隐藏前可以存活的时间
static var itemShowStayTime: int = 1500 # 物品展示组件如果设置了自动隐藏,那么隐藏前可以存活的时间
static var tipSpawnRateWhenGetDroppedItem: float = 0.25 # 当玩家获取到掉落物时,提示的概率