Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/text_overlay.tres
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

[resource]
font = ExtResource("1_0pp1u")
font_size = 32
font_size = 28
1 change: 1 addition & 0 deletions scenes/enemies/enemy.gd
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ func switch_state(state_enum) -> void:
state = PURSUIT
speed = pursuit_speed
DEAD:
Globals.enemies_killed += 1
state = DEAD
speed = 0
navigating = false
Expand Down
4 changes: 4 additions & 0 deletions scenes/globals.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ var player_health: int = 100
var player_max_health: int = 100
var player_armor: int = 0
var player_max_armor: int = 100
var crystals_collected: int = 0
var enemies_killed: int = 0

func player_invulnerable_timer():
await get_tree().create_timer(0.5).timeout
Expand All @@ -23,6 +25,8 @@ func add_screenshake(amount: float):

func collectable_collected(type: String) -> void:
collected.emit(type)
if type == "crystal":
crystals_collected += 1

func place_acid_aoe(position: Vector2, scaling: float) -> void:
acid_aoe.emit(position, scaling)
Expand Down
36 changes: 18 additions & 18 deletions scenes/hero.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,19 @@ height = 116.0
[sub_resource type="Environment" id="Environment_n40cg"]
glow_enabled = true

[sub_resource type="Animation" id="Animation_n40cg"]
resource_name = "hit"
length = 0.2
step = 0.05
[sub_resource type="Animation" id="Animation_txblw"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:material:shader_parameter/flash_active")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.100339, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true, false, false]
"values": [false]
}
tracks/1/type = "value"
tracks/1/imported = false
Expand All @@ -54,19 +52,21 @@ tracks/1/keys = {
"values": [Color(1, 1, 1, 1)]
}

[sub_resource type="Animation" id="Animation_txblw"]
length = 0.001
[sub_resource type="Animation" id="Animation_d6xj2"]
resource_name = "acidic"
length = 0.2
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:material:shader_parameter/flash_active")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"times": PackedFloat32Array(0, 0.1, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [false]
"values": [true, false, false]
}
tracks/1/type = "value"
tracks/1/imported = false
Expand All @@ -78,7 +78,7 @@ tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
"values": [Color(0, 0.659891, 0.178913, 1)]
}

[sub_resource type="Animation" id="Animation_n5qna"]
Expand Down Expand Up @@ -110,8 +110,8 @@ tracks/1/keys = {
"values": [Color(1, 0.298039, 0, 1)]
}

[sub_resource type="Animation" id="Animation_d6xj2"]
resource_name = "acidic"
[sub_resource type="Animation" id="Animation_n40cg"]
resource_name = "hit"
length = 0.2
step = 0.05
tracks/0/type = "value"
Expand All @@ -121,7 +121,7 @@ tracks/0/path = NodePath("Sprite2D:material:shader_parameter/flash_active")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2),
"times": PackedFloat32Array(0, 0.100339, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [true, false, false]
Expand All @@ -136,7 +136,7 @@ tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0, 0.659891, 0.178913, 1)]
"values": [Color(1, 1, 1, 1)]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_n5qna"]
Expand Down Expand Up @@ -172,7 +172,7 @@ horizontal_alignment = 1

[node name="Camera2D" type="Camera2D" parent="."]
offset = Vector2(25, 15)
zoom = Vector2(0.8, 0.8)
zoom = Vector2(0.7, 0.7)
script = ExtResource("3_mo806")

[node name="PlasmaRifle" parent="." instance=ExtResource("3_06baw")]
Expand Down
18 changes: 18 additions & 0 deletions scenes/utility/end_screen.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
extends Control

@onready var TitleScreenButton: Button = $MarginContainer/VBoxContainer/TitleScreenButton
@onready var RestartButton: Button = $MarginContainer/VBoxContainer/RestartButton

# Called when the node enters the scene tree for the first time.
func _ready():
$MarginContainer/VBoxContainer/HBoxContainer/BugsKilledLabel.text = str(Globals.enemies_killed)
$MarginContainer/VBoxContainer/HBoxContainer2/CrystalsCollectedLabel.text = str(Globals.crystals_collected)



func _on_title_screen_button_pressed():
get_tree().change_scene_to_file("res://scenes/utility/title.tscn")


func _on_restart_button_pressed():
get_tree().change_scene_to_file("res://scenes/levels/level1.tscn")
1 change: 1 addition & 0 deletions scenes/utility/end_screen.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://bbyeq7oncm6lp
106 changes: 106 additions & 0 deletions scenes/utility/end_screen.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
[gd_scene load_steps=6 format=3 uid="uid://b665roenfn8fk"]

[ext_resource type="Texture2D" uid="uid://3xsncjue460g" path="res://assets/BlueTechPanel.png" id="1_bqxyb"]
[ext_resource type="Theme" uid="uid://c8kkdp01b836k" path="res://resources/swarmed_theme.tres" id="1_euf3j"]
[ext_resource type="Script" uid="uid://bbyeq7oncm6lp" path="res://scenes/utility/end_screen.gd" id="2_dcpoi"]
[ext_resource type="Theme" uid="uid://c5v72c25vwjor" path="res://scenes/utility/menu_theme_blue.tres" id="2_tb0yk"]
[ext_resource type="LabelSettings" uid="uid://bbdyaw8jp0amn" path="res://resources/text_overlay.tres" id="3_euf3j"]

[node name="EndScreen" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_euf3j")
script = ExtResource("2_dcpoi")

[node name="NinePatchRect" type="NinePatchRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("1_bqxyb")
region_rect = Rect2(0, 0, 601.333, 600)
patch_margin_left = 55
patch_margin_top = 139
patch_margin_right = 84
patch_margin_bottom = 111

[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 300
theme_override_constants/margin_top = 100
theme_override_constants/margin_right = 300
theme_override_constants/margin_bottom = 100

[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
theme = ExtResource("2_tb0yk")
theme_override_constants/separation = 30

[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3

[node name="BugsText" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Total Bugs Killed:"
label_settings = ExtResource("3_euf3j")

[node name="BugsKilledLabel" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "0"

[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3

[node name="CrystalsText" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
layout_mode = 2
size_flags_horizontal = 3
text = "Total Crystals Collected:"
label_settings = ExtResource("3_euf3j")

[node name="CrystalsCollectedLabel" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
layout_mode = 2
size_flags_horizontal = 3
text = "0"

[node name="HBoxContainer3" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3

[node name="LastLevelText" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer3"]
layout_mode = 2
size_flags_horizontal = 3
text = "Total Levels Reached:"
label_settings = ExtResource("3_euf3j")

[node name="LevelNumberLabel" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer3"]
layout_mode = 2
size_flags_horizontal = 3
text = "0"

[node name="TitleScreenButton" type="Button" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
text = "Back to Title Screen"

[node name="RestartButton" type="Button" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
text = "Restart"

[connection signal="pressed" from="MarginContainer/VBoxContainer/TitleScreenButton" to="." method="_on_title_screen_button_pressed"]
[connection signal="pressed" from="MarginContainer/VBoxContainer/RestartButton" to="." method="_on_restart_button_pressed"]
12 changes: 3 additions & 9 deletions scenes/utility/menu.tscn
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
[gd_scene load_steps=7 format=3 uid="uid://bi4nry6akri6x"]
[gd_scene load_steps=6 format=3 uid="uid://bi4nry6akri6x"]

[ext_resource type="FontFile" uid="uid://cf01kekac2ysj" path="res://assets/fonts/orange-kid/Orange Kid.otf" id="1_l1drq"]
[ext_resource type="Theme" uid="uid://c5v72c25vwjor" path="res://scenes/utility/menu_theme_blue.tres" id="1_l1drq"]
[ext_resource type="Texture2D" uid="uid://3xsncjue460g" path="res://assets/BlueTechPanel.png" id="1_y1yol"]
[ext_resource type="Script" uid="uid://c2woi6pbsujj6" path="res://scenes/utility/menu.gd" id="2_el1m6"]
[ext_resource type="Texture2D" uid="uid://bq01vggk4yab7" path="res://assets/BlueSimplePanel.png" id="4_4ea3p"]
[ext_resource type="LabelSettings" uid="uid://bbdyaw8jp0amn" path="res://resources/text_overlay.tres" id="5_c4hkh"]

[sub_resource type="Theme" id="Theme_g3wkw"]
default_font = ExtResource("1_l1drq")
default_font_size = 32
Button/fonts/font = ExtResource("1_l1drq")
Label/fonts/font = ExtResource("1_l1drq")

[node name="Menu" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = SubResource("Theme_g3wkw")
theme = ExtResource("1_l1drq")
script = ExtResource("2_el1m6")

[node name="MarginContainer" type="MarginContainer" parent="."]
Expand Down
9 changes: 9 additions & 0 deletions scenes/utility/menu_theme_blue.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://c5v72c25vwjor"]

[ext_resource type="FontFile" uid="uid://cf01kekac2ysj" path="res://assets/fonts/orange-kid/Orange Kid.otf" id="1_q7qeu"]

[resource]
default_font = ExtResource("1_q7qeu")
default_font_size = 32
Button/fonts/font = ExtResource("1_q7qeu")
Label/fonts/font = ExtResource("1_q7qeu")
4 changes: 2 additions & 2 deletions scenes/utility/text_overlay.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ patch_margin_bottom = 100
[node name="MarginContainer" type="MarginContainer" parent="TextPopUp"]
layout_mode = 2
theme_override_constants/margin_left = 50
theme_override_constants/margin_top = 100
theme_override_constants/margin_top = 50
theme_override_constants/margin_right = 50
theme_override_constants/margin_bottom = 100
theme_override_constants/margin_bottom = 50

[node name="Label" type="Label" parent="TextPopUp/MarginContainer"]
layout_mode = 2
Expand Down