summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Janzen <jacob.a.s.janzen@gmail.com>2024-11-16 20:01:00 -0600
committerJacob Janzen <jacob.a.s.janzen@gmail.com>2024-11-16 20:01:00 -0600
commit73f8e11d939ffbffbc7e7fc96673d09f28c90647 (patch)
tree0b02161f3580cdce40ee86d3c33a23918cd8f4cc
parent87d20544d53adab42753bb10eddb955cf7957290 (diff)
add gameover screen
-rw-r--r--UI/GameOverScreen.pngbin0 -> 1977726 bytes
-rw-r--r--UI/GameOverScreen.png.import34
-rw-r--r--UI/GameOverScreen.xcfbin0 -> 21081396 bytes
-rw-r--r--UI/StartScreen.xcfbin21056386 -> 21081396 bytes
-rw-r--r--scenes/gameover.gd24
-rw-r--r--scenes/gameover.tscn43
6 files changed, 101 insertions, 0 deletions
diff --git a/UI/GameOverScreen.png b/UI/GameOverScreen.png
new file mode 100644
index 0000000..199e9e1
--- /dev/null
+++ b/UI/GameOverScreen.png
Binary files differ
diff --git a/UI/GameOverScreen.png.import b/UI/GameOverScreen.png.import
new file mode 100644
index 0000000..bb27609
--- /dev/null
+++ b/UI/GameOverScreen.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dobiydav6k32e"
+path="res://.godot/imported/GameOverScreen.png-bd411dac61a367ddc266f4895c67b79b.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://UI/GameOverScreen.png"
+dest_files=["res://.godot/imported/GameOverScreen.png-bd411dac61a367ddc266f4895c67b79b.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/UI/GameOverScreen.xcf b/UI/GameOverScreen.xcf
new file mode 100644
index 0000000..f2d5e16
--- /dev/null
+++ b/UI/GameOverScreen.xcf
Binary files differ
diff --git a/UI/StartScreen.xcf b/UI/StartScreen.xcf
index 3aabd12..b49ded5 100644
--- a/UI/StartScreen.xcf
+++ b/UI/StartScreen.xcf
Binary files differ
diff --git a/scenes/gameover.gd b/scenes/gameover.gd
new file mode 100644
index 0000000..9423936
--- /dev/null
+++ b/scenes/gameover.gd
@@ -0,0 +1,24 @@
+extends Node2D
+
+
+var earnings = Big.new(1, 100000)
+
+# Called when the node enters the scene tree for the first time.
+func _ready() -> void:
+ var label = $Label
+ label.text = "You made $%s\nYou lost $%s" % [earnings.toLongName(), earnings.toLongName()]
+ pass # Replace with function body.
+
+
+# Called every frame. 'delta' is the elapsed time since the previous frame.
+func _process(delta: float) -> void:
+ pass
+
+
+func _on_minimize_button_up() -> void:
+ OS.shell_open("https://youtu.be/0hpBKPbl0tk?si=I4ljc3fF5VrptriO")
+ DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_MINIMIZED)
+
+
+func _on_close_button_up() -> void:
+ get_tree().quit()
diff --git a/scenes/gameover.tscn b/scenes/gameover.tscn
new file mode 100644
index 0000000..229672c
--- /dev/null
+++ b/scenes/gameover.tscn
@@ -0,0 +1,43 @@
+[gd_scene load_steps=6 format=3 uid="uid://be813saajvxxs"]
+
+[ext_resource type="Texture2D" uid="uid://dobiydav6k32e" path="res://UI/GameOverScreen.png" id="1_60m3n"]
+[ext_resource type="Script" path="res://scenes/gameover.gd" id="1_clwwq"]
+[ext_resource type="Texture2D" uid="uid://dje61ck7cl66a" path="res://UI/minimizebuttonpressed.png" id="2_j8fs8"]
+[ext_resource type="Texture2D" uid="uid://brlgi3g1hy155" path="res://UI/xbuttonpressed.png" id="2_wb6l8"]
+[ext_resource type="Theme" uid="uid://ve18rbkeiwti" path="res://UI/text.tres" id="4_kotik"]
+
+[node name="Node2D" type="Node2D"]
+script = ExtResource("1_clwwq")
+
+[node name="Sprite2D" type="Sprite2D" parent="."]
+position = Vector2(640, 359)
+scale = Vector2(0.666, 0.666)
+texture = ExtResource("1_60m3n")
+
+[node name="Close" type="TextureButton" parent="."]
+offset_left = 1241.0
+offset_top = 11.0
+offset_right = 1281.0
+offset_bottom = 51.0
+scale = Vector2(0.65, 0.65)
+texture_pressed = ExtResource("2_wb6l8")
+
+[node name="Minimize" type="TextureButton" parent="."]
+offset_left = 1213.0
+offset_top = 11.0
+offset_right = 1253.0
+offset_bottom = 51.0
+scale = Vector2(0.66, 0.66)
+texture_pressed = ExtResource("2_j8fs8")
+
+[node name="Label" type="Label" parent="."]
+offset_left = 32.0
+offset_top = 625.0
+offset_right = 332.0
+offset_bottom = 690.0
+theme = ExtResource("4_kotik")
+text = "You made $
+You lost $"
+
+[connection signal="button_up" from="Close" to="." method="_on_close_button_up"]
+[connection signal="button_up" from="Minimize" to="." method="_on_minimize_button_up"]