Made pause controller to be created on player if it exists

This commit is contained in:
2ndbeam 2024-04-30 21:24:51 +03:00
commit 93aa83dcaa
11 changed files with 129 additions and 17 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=3 uid="uid://bsnrcw64qr2hr"]
[gd_scene load_steps=8 format=3 uid="uid://bsnrcw64qr2hr"]
[ext_resource type="Script" path="res://scripts/star_system.gd" id="1_xx8w2"]
[ext_resource type="PackedScene" uid="uid://dpggye27ln436" path="res://scenes/Star Systems/Required Scenes/star_generator.tscn" id="2_iqrn0"]
@ -7,9 +7,23 @@
[ext_resource type="Script" path="res://scripts/nebula.gd" id="5_la84n"]
[ext_resource type="PackedScene" uid="uid://c7is7y341f6wa" path="res://scenes/Star Systems/Required Scenes/pause_controller.tscn" id="6_61vq5"]
[sub_resource type="GDScript" id="GDScript_4yoh5"]
resource_name = "version_label"
script/source = "extends Label
func _ready():
text = \"cosmic {version}\".format({\"version\" : Game.gameversion})
if OS.has_feature(\"editor\"):
text += \" uncompiled\\ndebug/prerelease version\"
else:
if Game.beta:
text += \" beta\\nclosed beta\"
"
[node name="StarSystem" type="Node"]
process_mode = 3
script = ExtResource("1_xx8w2")
pause_controller_scene = ExtResource("6_61vq5")
[node name="Stars" parent="." instance=ExtResource("2_iqrn0")]
@ -32,5 +46,12 @@ grow_vertical = 2
script = ExtResource("5_la84n")
color_background = Color(0.36, 0.18612, 0.1116, 1)
[node name="PauseController" parent="." instance=ExtResource("6_61vq5")]
visible = false
[node name="Version" type="Label" parent="Background"]
z_index = 50
z_as_relative = false
offset_top = 6.0
offset_right = 1280.0
offset_bottom = 29.0
text = "GammaCosmicRays version Ifre 1.0"
horizontal_alignment = 1
script = SubResource("GDScript_4yoh5")