dynamically load monitor and crt shader

This commit is contained in:
2022-08-14 15:15:36 -04:00
parent e7fb9dff03
commit 2a7b20ed54
6 changed files with 76 additions and 9 deletions

View File

@@ -1,9 +1,7 @@
[gd_scene load_steps=5 format=2]
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Main.gdns" type="Script" id=1]
[ext_resource path="res://levels/Level2.tscn" type="PackedScene" id=2]
[ext_resource path="res://monitor/Monitor.tscn" type="PackedScene" id=3]
[ext_resource path="res://shaders/crt/crt.tscn" type="PackedScene" id=4]
[node name="Main" type="Node"]
pause_mode = 2
@@ -12,7 +10,3 @@ level = ExtResource( 2 )
[node name="Level" type="Node" parent="."]
pause_mode = 1
[node name="Monitor" parent="." instance=ExtResource( 3 )]
[node name="CRT" parent="." instance=ExtResource( 4 )]

View File

@@ -1,6 +1,9 @@
extends Node
signal monitor_loaded()
export var monitor_enabled: bool = false
export var development_url: String = "http://localhost:4050/api/v1"
var url_real: String = "https://alai.cromer.cl/api/v1"
@@ -101,6 +104,7 @@ func _physics_process(_delta: float) -> void:
if monitor_enabled:
if has_node("MonitorGUI") and not $MonitorGUI.visible:
$MonitorGUI.visible = true
emit_signal("monitor_loaded")
if started and not get_tree().paused:
var frame = empty_frame.duplicate(true)