diff --git a/backgounds/galaxy.tscn b/backgounds/galaxy.tscn index 50ce97b..b0b3ce6 100644 --- a/backgounds/galaxy.tscn +++ b/backgounds/galaxy.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=3 format=3 uid="uid://cnstwjy5mqdyo"] +[gd_scene load_steps=4 format=3 uid="uid://cnstwjy5mqdyo"] [ext_resource type="Texture2D" uid="uid://bona2ytn3y3a5" path="res://backgounds/galaxy.png" id="1_bmyxf"] [ext_resource type="Script" path="res://backgounds/galaxy.gd" id="1_h1j80"] +[ext_resource type="Script" path="res://fps.gd" id="3_t81vx"] [node name="galaxy" type="Node2D"] script = ExtResource("1_h1j80") @@ -10,3 +11,8 @@ script = ExtResource("1_h1j80") offset_right = 1280.0 offset_bottom = 720.0 texture = ExtResource("1_bmyxf") + +[node name="fps" type="Label" parent="."] +offset_right = 40.0 +offset_bottom = 23.0 +script = ExtResource("3_t81vx") diff --git a/backgounds/wormhole.tscn b/backgounds/wormhole.tscn index ede11b4..2f46eab 100644 --- a/backgounds/wormhole.tscn +++ b/backgounds/wormhole.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=3 format=3 uid="uid://by7ktb1k5ml5y"] +[gd_scene load_steps=4 format=3 uid="uid://by7ktb1k5ml5y"] [ext_resource type="Script" path="res://backgounds/wormhole.gd" id="1_fibhv"] [ext_resource type="Texture2D" uid="uid://bcfmwk0ffy73n" path="res://backgounds/wormhole.png" id="2_6mic1"] +[ext_resource type="Script" path="res://fps.gd" id="3_o2q0w"] [node name="wormhole" type="Node2D"] script = ExtResource("1_fibhv") @@ -10,3 +11,8 @@ script = ExtResource("1_fibhv") offset_right = 1280.0 offset_bottom = 720.0 texture = ExtResource("2_6mic1") + +[node name="fps" type="Label" parent="."] +offset_right = 40.0 +offset_bottom = 23.0 +script = ExtResource("3_o2q0w") diff --git a/bootclick.tscn b/bootclick.tscn index c9ef8ef..c19b88d 100644 --- a/bootclick.tscn +++ b/bootclick.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=2 format=3 uid="uid://dyaorf0qpfokg"] +[gd_scene load_steps=3 format=3 uid="uid://dyaorf0qpfokg"] [ext_resource type="Script" path="res://bootclick.gd" id="1_52bti"] +[ext_resource type="Script" path="res://fps.gd" id="2_gnh1w"] [node name="bootclick" type="Control"] layout_mode = 3 @@ -19,3 +20,9 @@ scale = Vector2(2.94857, 7.68) text = "Click here or press a gamepad button to continue" horizontal_alignment = 1 vertical_alignment = 1 + +[node name="fps" type="Label" parent="."] +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 23.0 +script = ExtResource("2_gnh1w") diff --git a/fps.gd b/fps.gd new file mode 100644 index 0000000..c2c9da1 --- /dev/null +++ b/fps.gd @@ -0,0 +1,4 @@ +extends Label + +func _process(delta: float) -> void: + set_text("FPS: " + str(Engine.get_frames_per_second())); diff --git a/levels/galaxy.gd b/levels/galaxy.gd index ff6389c..8190b40 100644 --- a/levels/galaxy.gd +++ b/levels/galaxy.gd @@ -6,7 +6,7 @@ var bgsound := AudioStreamPlayer.new() func _ready(): add_child(bgsound) - var titlemusic = load("res://music/eternity.mp3") + var titlemusic = load("res://music/alien-bulls.mp3") bgsound.stream = titlemusic bgsound.play(0) #pass # Replace with function body. diff --git a/levels/wormhole.gd b/levels/wormhole.gd index 8190b40..ff6389c 100644 --- a/levels/wormhole.gd +++ b/levels/wormhole.gd @@ -6,7 +6,7 @@ var bgsound := AudioStreamPlayer.new() func _ready(): add_child(bgsound) - var titlemusic = load("res://music/alien-bulls.mp3") + var titlemusic = load("res://music/eternity.mp3") bgsound.stream = titlemusic bgsound.play(0) #pass # Replace with function body. diff --git a/levels/wormhole.tscn b/levels/wormhole.tscn index 927d75c..401ff4b 100644 --- a/levels/wormhole.tscn +++ b/levels/wormhole.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=11 format=3 uid="uid://b82huqhu88xt6"] -[ext_resource type="Script" path="res://levels/galaxy.gd" id="1_x0xiy"] +[ext_resource type="Script" path="res://levels/wormhole.gd" id="1_n4a5i"] [ext_resource type="Texture2D" uid="uid://8lioamk650y7" path="res://sprites/css.png" id="2_y6cio"] [ext_resource type="Script" path="res://levels/css1.gd" id="3_4xg6i"] [ext_resource type="Texture2D" uid="uid://uscirt5qj0me" path="res://sprites/sat.png" id="4_4mf4s"] @@ -12,7 +12,7 @@ [ext_resource type="Texture2D" uid="uid://cpd31c6o18rmh" path="res://sprites/ss.png" id="10_shrek"] [node name="wormhole" type="Node2D"] -script = ExtResource("1_x0xiy") +script = ExtResource("1_n4a5i") [node name="css1" type="Sprite2D" parent="."] position = Vector2(852, 455) diff --git a/title.tscn b/title.tscn index bd7d20d..4687c69 100644 --- a/title.tscn +++ b/title.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=3 format=3 uid="uid://p010jtursgo2"] +[gd_scene load_steps=4 format=3 uid="uid://p010jtursgo2"] [ext_resource type="Script" path="res://title.gd" id="1_fbo7u"] [ext_resource type="Script" path="res://Game name.gd" id="2_bbb0f"] +[ext_resource type="Script" path="res://fps.gd" id="3_tsoef"] [node name="title" type="Control"] layout_mode = 3 @@ -21,3 +22,8 @@ offset_bottom = 297.0 scale = Vector2(6.38131, 6.11486) text = "The Red Robot Radio" script = ExtResource("2_bbb0f") + +[node name="fps" type="Label" parent="."] +offset_right = 40.0 +offset_bottom = 23.0 +script = ExtResource("3_tsoef")