feat: Overhaul of the Game Over UI, custom texture integrations, and fixing visual artifacts.

This commit is contained in:
2026-04-02 06:26:06 +08:00
parent f2739841c6
commit 362f8eda98
55 changed files with 1442 additions and 297 deletions
+22 -20
View File
@@ -194,17 +194,21 @@ func _process(delta):
rotation = carrier.rotation
_update_prompt_label()
if prompt_container and prompt_container.visible:
var time = Time.get_ticks_msec() / 1000.0
prompt_container.position.y = 2.4 + sin(time * 5.0) * 0.15
var mesh_cache: Array[MeshInstance3D] = []
var original_scales: Array[Vector3] = []
var prompt_label: Label3D
var prompt_container: Node3D
@onready var SettingsManager = get_node_or_null("/root/SettingsManager")
func _update_prompt_label():
if not prompt_label: return
if not prompt_container: return
if is_static_turret or is_carried or is_thrown or is_recovering:
prompt_label.visible = false
prompt_container.visible = false
return
var authority_player = null
@@ -215,40 +219,38 @@ func _update_prompt_label():
break
if not authority_player:
prompt_label.visible = false
prompt_container.visible = false
return
# Check distance
var player_pos = Vector2(authority_player.current_position.x, authority_player.current_position.y)
var tekton_pos = Vector2(current_position.x, current_position.y)
if player_pos.distance_to(tekton_pos) > 1.5:
prompt_label.visible = false
prompt_container.visible = false
return
# Check power bar
var pw_mgr = authority_player.get_node_or_null("PowerUpManager")
if pw_mgr and pw_mgr.current_boost >= (pw_mgr.MAX_BOOST - 1):
prompt_label.visible = true
prompt_container.visible = true
else:
prompt_label.visible = false
prompt_container.visible = false
func _ready():
# Cache meshes and their initial scales
_cache_meshes(self)
prompt_label = Label3D.new()
var shortcut_text = "G"
if SettingsManager and SettingsManager.has_method("get_control_text"):
shortcut_text = SettingsManager.get_control_text("tekton_grab")
prompt_label.text = "[ " + str(shortcut_text) + " ]"
prompt_label.font_size = 64
prompt_label.outline_size = 12
prompt_label.billboard = BaseMaterial3D.BILLBOARD_ENABLED
prompt_label.no_depth_test = true
prompt_label.position = Vector3(0, 1.8, 0)
prompt_label.modulate = Color(1.0, 0.9, 0.0) # Yellow text
prompt_label.visible = false
add_child(prompt_label)
prompt_container = get_node_or_null("InteractionPrompt")
if prompt_container:
prompt_container.visible = false
var key_label = prompt_container.get_node_or_null("KeyLabel")
if key_label:
var shortcut_text = "G"
if SettingsManager and SettingsManager.has_method("get_control_text"):
shortcut_text = SettingsManager.get_control_text("tekton_grab")
key_label.text = "[ " + str(shortcut_text) + " ]"
else:
push_warning("[Tekton] 'InteractionPrompt' node missing. UI will not appear.")
func _cache_meshes(node: Node):
if node is MeshInstance3D: