From 58fb2e6643317c4c712514c3a40d6e55b21e2fae Mon Sep 17 00:00:00 2001 From: Mark Hoekveen Date: Sun, 12 Feb 2023 21:54:20 +0100 Subject: [PATCH] cleanups --- Scripts/Einde.gd | 12 +----------- Scripts/Gui.gd | 11 ----------- Scripts/Splash.gd | 4 ++-- Scripts/lichtkastje.gd | 1 - 4 files changed, 3 insertions(+), 25 deletions(-) diff --git a/Scripts/Einde.gd b/Scripts/Einde.gd index f8892a1..c9eca41 100644 --- a/Scripts/Einde.gd +++ b/Scripts/Einde.gd @@ -1,16 +1,5 @@ extends StaticBody3D - -# Called when the node enters the scene tree for the first time. -func _ready(): - pass # Replace with function body. - - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): - pass - - func eindig(): $".."/Room/Doorframe/Door.visible = false $".."/Room/Doorframe/Door/Deur.set_collision_layer(0) @@ -22,3 +11,4 @@ func eindig(): $"../Einde/Wincamera/AudioStreamPlayer3D2".stream.loop = false $"../Einde/Wincamera/AudioStreamPlayer3D3".stream.loop = false $"../Muziek".playing = false + $"../Gui".visible = false diff --git a/Scripts/Gui.gd b/Scripts/Gui.gd index ce3915c..dd2766d 100644 --- a/Scripts/Gui.gd +++ b/Scripts/Gui.gd @@ -1,13 +1,8 @@ extends CanvasLayer @onready var bottle_service = $Control/BottleService -var timer = 0 const clear_time = 5 -# Called when the node enters the scene tree for the first time. -func _ready(): - pass # Replace with function body. - func message(msg: String, title: String = ""): var popup = RichTextLabel.new() popup.custom_minimum_size = Vector2(200,100) @@ -24,12 +19,6 @@ func message(msg: String, title: String = ""): close.pressed.connect(_on_close_pressed.bind(close)) popup.add_child(close) bottle_service.add_child(popup) - timer = 0 - -func _process(delta): - timer += delta - #$"Control/HFlowContainer/SubViewportContainer/SubViewport/Camera3D/Item Position".get_child(0).rotation.y += delta - #$Control/SubViewportContainer/SubViewport/Camera3D/sleutel.rotation.y += delta func add_item(mesh: Node): var subviewport = preload("res://GUI-item.tscn").instantiate() diff --git a/Scripts/Splash.gd b/Scripts/Splash.gd index 04fd701..2c95b32 100644 --- a/Scripts/Splash.gd +++ b/Scripts/Splash.gd @@ -8,7 +8,7 @@ var start = false @onready var anim = $Draakje func _ready(): - get_tree().get_root().print_tree() + #get_tree().get_root().print_tree() anim.play("default") $Draakje/Hoest.playing = true var size = get_viewport_rect().size @@ -25,7 +25,7 @@ func _process(delta): opacity_panel -= delta * (1.1 - opacity_panel) bg.bg_color.a = opacity_panel if opacity_panel <= 0: - print("free willy") + print("unloading splash screen") queue_free() #Recenter draakje diff --git a/Scripts/lichtkastje.gd b/Scripts/lichtkastje.gd index 43bb463..fc4a200 100644 --- a/Scripts/lichtkastje.gd +++ b/Scripts/lichtkastje.gd @@ -16,7 +16,6 @@ func _on_lock_input_event(_camera, event, _position, _normal, _shape_idx): $Lock/DeurOpen.playing = true $"../Gui".clear_items() - func _on_lever_input_event(_camera, event, _position, _normal, _shape_idx): if event is InputEventMouseButton and event.is_action_pressed("interact"): $Lever/LeverOmhaal.playing = true