42 lines
1.2 KiB
GDScript
42 lines
1.2 KiB
GDScript
extends SceneTree
|
|
|
|
func _init():
|
|
# Try to load and instantiate the MainHUD scene
|
|
var scene = load("res://scenes/ui/MainHUD.tscn")
|
|
if scene:
|
|
print("SUCCESS: MainHUD.tscn loaded successfully")
|
|
var instance = scene.instantiate()
|
|
if instance:
|
|
print("SUCCESS: MainHUD.tscn instantiated successfully")
|
|
|
|
# Check if key nodes exist
|
|
if instance.has_node("CRTFrame"):
|
|
print("SUCCESS: CRTFrame node found")
|
|
else:
|
|
print("ERROR: CRTFrame node not found")
|
|
|
|
if instance.has_node("ResourcePanel"):
|
|
print("SUCCESS: ResourcePanel node found")
|
|
else:
|
|
print("ERROR: ResourcePanel node not found")
|
|
|
|
if instance.has_node("CrewRosterPanel"):
|
|
print("SUCCESS: CrewRosterPanel node found")
|
|
else:
|
|
print("ERROR: CrewRosterPanel node not found")
|
|
|
|
# Check if shader is applied
|
|
if instance.has_node("CRTShader"):
|
|
var crt_shader = instance.get_node("CRTShader")
|
|
if crt_shader.material:
|
|
print("SUCCESS: CRT shader material applied")
|
|
else:
|
|
print("WARNING: CRT shader material not applied")
|
|
else:
|
|
print("ERROR: CRTShader node not found")
|
|
else:
|
|
print("ERROR: Failed to instantiate MainHUD.tscn")
|
|
else:
|
|
print("ERROR: Failed to load MainHUD.tscn")
|
|
|
|
quit() |