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,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://l4mybb2dw107"]
[gd_scene load_steps=10 format=3 uid="uid://l4mybb2dw107"]
[ext_resource type="PackedScene" uid="uid://cwkcf8h5rspoh" path="res://scenes/objects/player.tscn" id="1_nq1ke"]
[ext_resource type="PackedScene" uid="uid://cxlgt8h33u7os" path="res://scenes/objects/tower.tscn" id="2_betjv"]
@@ -7,6 +7,7 @@
[ext_resource type="PackedScene" uid="uid://2tqfm73cc4id" path="res://scenes/manager/statistics.tscn" id="5_qd3ww"]
[ext_resource type="PackedScene" uid="uid://cjam63kp5sg2o" path="res://scenes/ui/stats_overlay.tscn" id="5_rymed"]
[ext_resource type="PackedScene" uid="uid://dy51uqtr2ng32" path="res://scenes/ui/finish_screen.tscn" id="6_b264x"]
[ext_resource type="PackedScene" uid="uid://5mt7abqkbpei" path="res://scenes/ui/reward_claim_screen.tscn" id="6_t43s0"]
[sub_resource type="Curve2D" id="Curve2D_gwd20"]
_data = {
@@ -39,6 +40,11 @@ rotation = 1.5708
[node name="StatsOverlay" parent="." node_paths=PackedStringArray("stats") instance=ExtResource("5_rymed")]
stats = NodePath("../Statistics")
[node name="RewardClaimScreen" parent="." node_paths=PackedStringArray("tower", "player") instance=ExtResource("6_t43s0")]
visible = false
tower = NodePath("../Tower")
player = NodePath("../Player")
[node name="FinishScreen" parent="." node_paths=PackedStringArray("stats") instance=ExtResource("6_b264x")]
visible = false
stats = NodePath("../Statistics")
@@ -48,4 +54,5 @@ stats = NodePath("../Statistics")
[connection signal="enemy_defeat" from="EnemyFarm" to="Statistics" method="_on_enemy_defeated"]
[connection signal="tower_broken" from="Tower" to="FinishScreen" method="_show"]
[connection signal="wave_finished" from="Statistics" to="EnemyFarm" method="_on_wave_finished"]
[connection signal="wave_finished" from="Statistics" to="RewardClaimScreen" method="_show"]
[connection signal="wave_started" from="Statistics" to="EnemyFarm" method="_on_wave_started"]

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