Upgradable

This commit is contained in:
2024-02-17 00:55:13 +08:00
parent cc562a4950
commit 8be0789b17
11 changed files with 280 additions and 10 deletions

View File

@@ -1,9 +1,12 @@
[gd_scene load_steps=3 format=3 uid="uid://dy51uqtr2ng32"]
[gd_scene load_steps=4 format=3 uid="uid://dy51uqtr2ng32"]
[ext_resource type="Script" path="res://scripts/ui/finish_screen.gd" id="1_c1emt"]
[ext_resource type="Theme" uid="uid://gh5a3no0ojkl" path="res://codingland.tres" id="1_l6ven"]
[node name="FinishScreen" type="Control"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_djdno"]
bg_color = Color(0.301961, 0.301961, 0.301961, 1)
[node name="FinishScreen" type="Control" node_paths=PackedStringArray("survived_indicator", "wave_indicator", "enemies_indicator", "bullet_indicator")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
@@ -12,17 +15,107 @@ grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_l6ven")
script = ExtResource("1_c1emt")
survived_indicator = NodePath("Panel/SurvivedTime")
wave_indicator = NodePath("Panel/WaveCount")
enemies_indicator = NodePath("Panel/EnemyCount")
bullet_indicator = NodePath("Panel/BulletCount")
[node name="Panel" type="Panel" parent="."]
layout_mode = 0
offset_right = 1152.0
offset_bottom = 648.0
theme_override_styles/panel = SubResource("StyleBoxFlat_djdno")
[node name="Title" type="Label" parent="Panel"]
layout_mode = 0
offset_top = 280.0
offset_top = 128.0
offset_right = 1152.0
offset_bottom = 364.0
offset_bottom = 212.0
theme_override_font_sizes/font_size = 64
text = "Game Over"
text = "You failed"
horizontal_alignment = 1
[node name="Subtitle" type="Label" parent="Panel"]
layout_mode = 0
offset_top = 208.0
offset_right = 1152.0
offset_bottom = 250.0
theme_override_font_sizes/font_size = 28
text = "The tower has been destroyed"
horizontal_alignment = 1
[node name="SurvivedCaption" type="Label" parent="Panel"]
layout_mode = 0
offset_top = 416.0
offset_right = 576.0
offset_bottom = 448.0
theme_override_font_sizes/font_size = 24
text = "You Survived"
horizontal_alignment = 1
[node name="SurvivedTime" type="Label" parent="Panel"]
layout_mode = 0
offset_top = 440.0
offset_right = 576.0
offset_bottom = 504.0
theme_override_font_sizes/font_size = 48
text = "0.0s"
horizontal_alignment = 1
[node name="WaveCaption" type="Label" parent="Panel"]
layout_mode = 0
offset_top = 296.0
offset_right = 576.0
offset_bottom = 328.0
theme_override_font_sizes/font_size = 24
text = "Wave"
horizontal_alignment = 1
[node name="WaveCount" type="Label" parent="Panel"]
layout_mode = 0
offset_top = 324.0
offset_right = 576.0
offset_bottom = 388.0
theme_override_font_sizes/font_size = 48
text = "1"
horizontal_alignment = 1
[node name="EnemyTitle" type="Label" parent="Panel"]
layout_mode = 0
offset_left = 576.0
offset_top = 296.0
offset_right = 1152.0
offset_bottom = 328.0
theme_override_font_sizes/font_size = 24
text = "Enemy Defeated"
horizontal_alignment = 1
[node name="EnemyCount" type="Label" parent="Panel"]
layout_mode = 0
offset_left = 576.0
offset_top = 324.0
offset_right = 1152.0
offset_bottom = 388.0
theme_override_font_sizes/font_size = 48
text = "0"
horizontal_alignment = 1
[node name="BulletTitle" type="Label" parent="Panel"]
layout_mode = 0
offset_left = 576.0
offset_top = 416.0
offset_right = 1152.0
offset_bottom = 448.0
theme_override_font_sizes/font_size = 24
text = "Bullet Shoot"
horizontal_alignment = 1
[node name="BulletCount" type="Label" parent="Panel"]
layout_mode = 0
offset_left = 576.0
offset_top = 440.0
offset_right = 1152.0
offset_bottom = 504.0
theme_override_font_sizes/font_size = 48
text = "0"
horizontal_alignment = 1

View File

@@ -0,0 +1,34 @@
[gd_scene load_steps=5 format=3 uid="uid://5mt7abqkbpei"]
[ext_resource type="Theme" uid="uid://gh5a3no0ojkl" path="res://codingland.tres" id="1_yxvac"]
[ext_resource type="Script" path="res://scripts/ui/reward_claim_screen.gd" id="2_c2hn7"]
[ext_resource type="PackedScene" uid="uid://bayylbkjbagy5" path="res://scenes/ui/reward_item.tscn" id="3_p7bh8"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3xnq2"]
bg_color = Color(0.301961, 0.301961, 0.301961, 1)
[node name="RewardClaimScreen" type="Control"]
process_mode = 3
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_yxvac")
script = ExtResource("2_c2hn7")
card = ExtResource("3_p7bh8")
[node name="Panel" type="Panel" parent="."]
layout_mode = 0
offset_right = 1152.0
offset_bottom = 648.0
theme_override_styles/panel = SubResource("StyleBoxFlat_3xnq2")
[node name="RewardContainer" type="HBoxContainer" parent="Panel"]
layout_mode = 0
offset_left = 32.0
offset_top = 32.0
offset_right = 1120.0
offset_bottom = 616.0
alignment = 1

View File

@@ -0,0 +1,43 @@
[gd_scene load_steps=2 format=3 uid="uid://bayylbkjbagy5"]
[ext_resource type="Script" path="res://scripts/ui/reward_item.gd" id="1_v4j3k"]
[node name="RewardItem" type="Panel"]
custom_minimum_size = Vector2(360, 584)
script = ExtResource("1_v4j3k")
[node name="Title" type="Label" parent="."]
layout_mode = 0
offset_top = 120.0
offset_right = 360.0
offset_bottom = 162.0
theme_override_font_sizes/font_size = 32
text = "Reward"
horizontal_alignment = 1
[node name="Subtitle" type="Label" parent="."]
layout_mode = 0
offset_top = 160.0
offset_right = 360.0
offset_bottom = 184.0
theme_override_font_sizes/font_size = 16
text = "Reward description"
horizontal_alignment = 1
[node name="Description" type="RichTextLabel" parent="."]
layout_mode = 0
offset_left = 52.0
offset_top = 208.0
offset_right = 308.0
offset_bottom = 504.0
bbcode_enabled = true
text = "This is the world most powerful reward. Trust me, choose this is a great choice."
[node name="ClaimButton" type="Button" parent="."]
offset_left = 52.0
offset_top = 520.0
offset_right = 308.0
offset_bottom = 552.0
text = "Claim"
[connection signal="pressed" from="ClaimButton" to="." method="_on_claim"]

View File

@@ -30,17 +30,18 @@ offset_bottom = 648.0
[node name="SurvivedCaption" type="Label" parent="SurvivedControl"]
layout_mode = 0
offset_top = 5.0
offset_right = 1152.0
offset_bottom = 26.0
offset_bottom = 31.0
theme_override_font_sizes/font_size = 18
text = "You survived"
horizontal_alignment = 1
[node name="SurvivedTime" type="Label" parent="SurvivedControl"]
layout_mode = 0
offset_top = 20.0
offset_top = 25.0
offset_right = 1152.0
offset_bottom = 65.0
offset_bottom = 70.0
theme_override_font_sizes/font_size = 32
text = "0.0s"
horizontal_alignment = 1