mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
fix(UI): 修正ColorBar默认值和DamageLabel文本显示
refactor(Bullets): 调整BigLaser和Diamond的旋转插值系数 feat(EntityBase): 添加掉落物提示概率控制 style(BossBar): 添加currentValue默认值和label对齐方式 docs(GameRule): 新增掉落物提示概率配置项
This commit is contained in:
@@ -32,6 +32,7 @@ offset_right = 0.0
|
|||||||
offset_bottom = -40.0
|
offset_bottom = -40.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 0
|
grow_vertical = 0
|
||||||
|
currentValue = 0.0
|
||||||
|
|
||||||
[node name="panel" type="PanelContainer" parent="health"]
|
[node name="panel" type="PanelContainer" parent="health"]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
@@ -44,6 +45,7 @@ theme_override_styles/panel = SubResource("StyleBoxEmpty_ar00p")
|
|||||||
|
|
||||||
[node name="label" type="HBoxContainer" parent="health/panel"]
|
[node name="label" type="HBoxContainer" parent="health/panel"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
[node name="name" type="Label" parent="health/panel/label"]
|
[node name="name" type="Label" parent="health/panel/label"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ anchors_preset = 0
|
|||||||
offset_right = 100.0
|
offset_right = 100.0
|
||||||
offset_bottom = 10.0
|
offset_bottom = 10.0
|
||||||
script = ExtResource("1_a106p")
|
script = ExtResource("1_a106p")
|
||||||
currentValue = 0.0
|
currentValue = 100.0
|
||||||
backBox = SubResource("StyleBoxFlat_kf2fc")
|
backBox = SubResource("StyleBoxFlat_kf2fc")
|
||||||
middleBox1 = SubResource("StyleBoxFlat_sh754")
|
middleBox1 = SubResource("StyleBoxFlat_sh754")
|
||||||
middleBox2 = SubResource("StyleBoxFlat_8n8i8")
|
middleBox2 = SubResource("StyleBoxFlat_8n8i8")
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ _data = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[node name="DamageLabel" type="Node2D"]
|
[node name="DamageLabel" type="Node2D"]
|
||||||
|
z_index = 1
|
||||||
script = ExtResource("1_0q15u")
|
script = ExtResource("1_0q15u")
|
||||||
color1 = Color(1, 1, 1, 1)
|
color1 = Color(1, 1, 1, 1)
|
||||||
|
|
||||||
@@ -122,7 +123,7 @@ offset_left = -100.0
|
|||||||
offset_top = -100.0
|
offset_top = -100.0
|
||||||
offset_right = 100.0
|
offset_right = 100.0
|
||||||
offset_bottom = 100.0
|
offset_bottom = 100.0
|
||||||
text = "114514"
|
text = "%dmg%"
|
||||||
label_settings = SubResource("LabelSettings_valp2")
|
label_settings = SubResource("LabelSettings_valp2")
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ extends BulletBase
|
|||||||
class_name BigLaser
|
class_name BigLaser
|
||||||
|
|
||||||
func ai():
|
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
|
position = launcher.texture.global_position
|
||||||
func applyDot():
|
func applyDot():
|
||||||
hitbox.disabled = true
|
hitbox.disabled = true
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ class_name Diamond
|
|||||||
const traceTime = 2000
|
const traceTime = 2000
|
||||||
|
|
||||||
func ai():
|
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)
|
canDamageSelf = !(timeLived() >= traceTime)
|
||||||
forward(Vector2.from_angle(rotation))
|
forward(Vector2.from_angle(rotation))
|
||||||
|
|||||||
@@ -90,7 +90,8 @@ func _ready():
|
|||||||
)
|
)
|
||||||
itemCollected.connect(
|
itemCollected.connect(
|
||||||
func(itemType, amount):
|
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:
|
else:
|
||||||
currentFocusedBoss = get_tree().get_nodes_in_group("players")[0]
|
currentFocusedBoss = get_tree().get_nodes_in_group("players")[0]
|
||||||
|
|||||||
@@ -8,4 +8,5 @@ static var itemDroppedSpawnOffset: float = 30 # 掉落物生成位置的随机
|
|||||||
static var appleDropRate: float = 0.1 # 苹果掉落概率
|
static var appleDropRate: float = 0.1 # 苹果掉落概率
|
||||||
static var refreshCountIncreasePercent: Vector2 = Vector2(0.4, 1.1) # 刷新所需的棒球数量的增加的百分比,随机,默认为40%~110%
|
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 # 物品展示组件如果设置了自动隐藏,那么隐藏前可以存活的时间
|
static var itemShowStayTime: int = 1500 # 物品展示组件如果设置了自动隐藏,那么隐藏前可以存活的时间
|
||||||
|
static var tipSpawnRateWhenGetDroppedItem: float = 0.25 # 当玩家获取到掉落物时,提示的概率
|
||||||
Reference in New Issue
Block a user