Rewriting star system complete
This commit is contained in:
parent
4172b336c1
commit
350b9853f2
13 changed files with 118 additions and 70 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=12 format=3 uid="uid://dok3i8u5t1ka4"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://dok3i8u5t1ka4"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bjkshql8ut6hk" path="res://scenes/Ships/ship.tscn" id="1_6x7bu"]
|
||||
[ext_resource type="Script" path="res://scripts/Ship/player_ship.gd" id="2_oqdd7"]
|
||||
|
|
@ -58,26 +58,6 @@ func _process(_delta):
|
|||
text = unformatted_text.format([ship.shield.capacity, ship.shield.max_capacity])
|
||||
"
|
||||
|
||||
[sub_resource type="Theme" id="Theme_d8vjy"]
|
||||
default_font_size = 48
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_6uw1d"]
|
||||
resource_name = "pause_controller"
|
||||
script/source = "extends Control
|
||||
|
||||
# TODO: implement save
|
||||
|
||||
## Resumes game
|
||||
func _on_resume_button_up():
|
||||
get_tree().current_scene.unpause()
|
||||
|
||||
## Saves profile and exits game
|
||||
func _on_exit_button_up():
|
||||
get_tree().current_scene.unpause()
|
||||
get_tree().change_scene_to_file(\"res://scenes/MainMenu.tscn\")
|
||||
#Game.profile_save(get_tree().current_scene)
|
||||
"
|
||||
|
||||
[node name="PlayerShip" instance=ExtResource("1_6x7bu")]
|
||||
script = ExtResource("2_oqdd7")
|
||||
|
||||
|
|
@ -121,36 +101,8 @@ offset_bottom = 661.0
|
|||
text = "Shield: {0} / {1} units"
|
||||
script = SubResource("GDScript_q1sx2")
|
||||
|
||||
[node name="PauseController" type="Control" parent="ColorableGUI" index="4"]
|
||||
process_mode = 2
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
theme = SubResource("Theme_d8vjy")
|
||||
script = SubResource("GDScript_6uw1d")
|
||||
|
||||
[node name="Resume" type="Button" parent="ColorableGUI/PauseController" index="0"]
|
||||
layout_mode = 0
|
||||
offset_left = 444.0
|
||||
offset_top = 254.0
|
||||
offset_right = 779.0
|
||||
offset_bottom = 329.0
|
||||
text = "Resume game"
|
||||
|
||||
[node name="Exit" type="Button" parent="ColorableGUI/PauseController" index="1"]
|
||||
layout_mode = 0
|
||||
offset_left = 449.0
|
||||
offset_top = 357.0
|
||||
offset_right = 763.0
|
||||
offset_bottom = 432.0
|
||||
text = "Save and exit"
|
||||
|
||||
[node name="NonColorableGUI" type="CanvasLayer" parent="." index="6"]
|
||||
|
||||
[node name="Camera" type="Camera2D" parent="." index="7"]
|
||||
zoom = Vector2(0.5, 0.5)
|
||||
script = ExtResource("5_rclap")
|
||||
|
||||
[connection signal="button_up" from="ColorableGUI/PauseController/Resume" to="ColorableGUI/PauseController" method="_on_resume_button_up"]
|
||||
[connection signal="button_up" from="ColorableGUI/PauseController/Exit" to="ColorableGUI/PauseController" method="_on_exit_button_up"]
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
[ext_resource type="Script" path="res://scripts/Ship/weapons.gd" id="5_ooyny"]
|
||||
|
||||
[node name="Ship" type="Node2D"]
|
||||
process_mode = 1
|
||||
script = ExtResource("2_n14ml")
|
||||
|
||||
[node name="HullHolder" type="Node" parent="."]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue