feat: 添加升级面板到arena,添加全局事件监听升级选择
This commit is contained in:
@@ -14,3 +14,10 @@ func _set_data(value: ItemUpgrade) -> void:
|
||||
item_name.text = item_data.item_name
|
||||
item_description.text = item_data.descriptin
|
||||
|
||||
|
||||
|
||||
func _on_custom_button_pressed() -> void:
|
||||
if item_data and is_instance_valid(Global.player):
|
||||
item_data.apply_upgrade()
|
||||
Global.on_upgrade_selected.emit()
|
||||
|
||||
|
||||
@@ -69,3 +69,5 @@ layout_mode = 1
|
||||
offset_left = -130.0
|
||||
offset_top = -58.0
|
||||
offset_right = 130.0
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/Control/CustomButton" to="." method="_on_custom_button_pressed"]
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
font_size = 120
|
||||
|
||||
[node name="UpgradePanel" type="Panel" unique_id=35283646]
|
||||
self_modulate = Color(0.34509805, 0.34509805, 0.34509805, 1)
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
Reference in New Issue
Block a user