miawwwww its epic
This commit is contained in:
parent
af8662fd6a
commit
f510a916f7
21 changed files with 400 additions and 16 deletions
BIN
assets/craftarrow.png
Normal file
BIN
assets/craftarrow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 499 B |
40
assets/craftarrow.png.import
Normal file
40
assets/craftarrow.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cu18nhutsu0ov"
|
||||
path="res://.godot/imported/craftarrow.png-d573a3e20f434757cbe57c783b76d428.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/craftarrow.png"
|
||||
dest_files=["res://.godot/imported/craftarrow.png-d573a3e20f434757cbe57c783b76d428.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
BIN
assets/ending.png
Normal file
BIN
assets/ending.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 356 KiB |
40
assets/ending.png.import
Normal file
40
assets/ending.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://jdfmarm0iilr"
|
||||
path="res://.godot/imported/ending.png-c85172e8c7e8ac54c531ca5c9a4f3ec1.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ending.png"
|
||||
dest_files=["res://.godot/imported/ending.png-c85172e8c7e8ac54c531ca5c9a4f3ec1.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
BIN
assets/menu.png
Normal file
BIN
assets/menu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 246 KiB |
40
assets/menu.png.import
Normal file
40
assets/menu.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b1rs6epjar6mj"
|
||||
path="res://.godot/imported/menu.png-507092a63be01007fcca0624aab4189b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/menu.png"
|
||||
dest_files=["res://.godot/imported/menu.png-507092a63be01007fcca0624aab4189b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
[ext_resource type="Script" uid="uid://mvqohkfd6whc" path="res://crafting/recipe book/recipe_card.gd" id="1_8t2l7"]
|
||||
[ext_resource type="PackedScene" uid="uid://dgqs20xf7l8c" path="res://inv_system/item_slot.tscn" id="1_ebtwo"]
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_8t2l7"]
|
||||
size = Vector2(32, 32)
|
||||
[ext_resource type="Texture2D" uid="uid://cu18nhutsu0ov" path="res://assets/craftarrow.png" id="3_qstsn"]
|
||||
|
||||
[node name="Recipe Card" type="PanelContainer" node_paths=PackedStringArray("grid_container", "output_slot", "output_label")]
|
||||
script = ExtResource("1_8t2l7")
|
||||
|
|
@ -58,7 +56,7 @@ layout_mode = 2
|
|||
|
||||
[node name="TextureRect" type="TextureRect" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
texture = SubResource("PlaceholderTexture2D_8t2l7")
|
||||
texture = ExtResource("3_qstsn")
|
||||
stretch_mode = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
|
||||
|
|
|
|||
|
|
@ -122,8 +122,3 @@ func _on_action_button_pressed() -> void:
|
|||
add_item(matched_recipe.roll())
|
||||
check_recipes()
|
||||
pass # Replace with function body.
|
||||
|
||||
func empty_grid():
|
||||
for slot in slots:
|
||||
slot.item = null
|
||||
slot.update_ui()
|
||||
|
|
|
|||
|
|
@ -52,3 +52,8 @@ func filled_slots() -> int:
|
|||
if slot.item:
|
||||
count += 1
|
||||
return count
|
||||
|
||||
func empty_grid():
|
||||
for slot in slots:
|
||||
slot.item = null
|
||||
slot.update_ui()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=9 format=3 uid="uid://bkhg56q71vsjv"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://bkhg56q71vsjv"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://jxkjnscuxcyi" path="res://inv_system/player_inventory.gd" id="1_vk2kx"]
|
||||
[ext_resource type="Script" uid="uid://c6oycdae5wvjf" path="res://inv_system/inventory.gd" id="2_hk4hx"]
|
||||
|
|
@ -42,6 +42,10 @@ corner_radius_bottom_right = 3
|
|||
corner_radius_bottom_left = 3
|
||||
corner_detail = 5
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_bdgfq"]
|
||||
font_size = 24
|
||||
font_color = Color(1, 0.7490196, 0, 1)
|
||||
|
||||
[node name="PlayerInventory" type="Control" node_paths=PackedStringArray("inventory_panel", "button", "money_label")]
|
||||
z_index = 2
|
||||
layout_mode = 3
|
||||
|
|
@ -261,6 +265,7 @@ offset_bottom = 608.0
|
|||
[node name="Label" type="Label" parent="PanelContainer"]
|
||||
layout_mode = 2
|
||||
text = "Money: $0"
|
||||
label_settings = SubResource("LabelSettings_bdgfq")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ config_version=5
|
|||
[application]
|
||||
|
||||
config/name="Repurposed Jam"
|
||||
run/main_scene="uid://dbxymsdyvbe2p"
|
||||
run/main_scene="uid://dxr1ergmn3ij7"
|
||||
config/features=PackedStringArray("4.5", "GL Compatibility")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
|
|
|
|||
41
scenes/ending.gd
Normal file
41
scenes/ending.gd
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
extends Control
|
||||
|
||||
@export var server_box : HBoxContainer
|
||||
@export var score_label : Label
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
#sell remaining inventory
|
||||
var inv_sell_value : int = 0
|
||||
for slot in PlayerInventory.inventory_panel.slots:
|
||||
if slot.item:
|
||||
inv_sell_value += floori(slot.item.buy_value/float(2))
|
||||
|
||||
var server_item : ItemData = load("res://items/server.tres")
|
||||
for x in range(PlayerInventory.botnet_servers):
|
||||
var new_slot : ItemSlot = load("res://inv_system/item_slot.tscn").instantiate()
|
||||
new_slot.item = server_item
|
||||
new_slot.update_ui()
|
||||
new_slot.block_taking = true
|
||||
server_box.add_child(new_slot)
|
||||
|
||||
score_label.text = str(PlayerInventory.botnet_servers) + " machines + $" + str(PlayerInventory.money + inv_sell_value)
|
||||
|
||||
|
||||
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_reset_button_pressed() -> void:
|
||||
PlayerInventory.money = 0
|
||||
PlayerInventory.botnet_servers = 0
|
||||
PlayerInventory.inventory_panel.empty_grid()
|
||||
Clock.days_left = 7
|
||||
Clock.time_left = 200
|
||||
PlayerInventory.show()
|
||||
Clock.show()
|
||||
get_tree().change_scene_to_file("res://scenes/workshop.tscn")
|
||||
1
scenes/ending.gd.uid
Normal file
1
scenes/ending.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://ekqrygb4eunr
|
||||
89
scenes/ending.tscn
Normal file
89
scenes/ending.tscn
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://b17m8fgb3hhcn"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ekqrygb4eunr" path="res://scenes/ending.gd" id="1_2x1jc"]
|
||||
[ext_resource type="Texture2D" uid="uid://jdfmarm0iilr" path="res://assets/ending.png" id="1_mqjok"]
|
||||
|
||||
[node name="Ending" type="Control" node_paths=PackedStringArray("server_box", "score_label")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
script = ExtResource("1_2x1jc")
|
||||
server_box = NodePath("MarginContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer")
|
||||
score_label = NodePath("MarginContainer/PanelContainer/MarginContainer/VBoxContainer/ScoreL")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
z_index = -3
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("1_mqjok")
|
||||
expand_mode = 3
|
||||
|
||||
[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 = 250
|
||||
theme_override_constants/margin_top = 100
|
||||
theme_override_constants/margin_right = 250
|
||||
theme_override_constants/margin_bottom = 100
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/PanelContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 5
|
||||
theme_override_constants/margin_top = 5
|
||||
theme_override_constants/margin_right = 5
|
||||
theme_override_constants/margin_bottom = 5
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/PanelContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
bbcode_enabled = true
|
||||
text = "[center][font_size=50][wave]meow!!"
|
||||
fit_content = true
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "You launch your botnet filling the internet with catgirls!"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="ScoreL" type="Label" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "5 machines + $1234"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="RichTextLabel2" type="RichTextLabel" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
bbcode_enabled = true
|
||||
text = "[wave][color=orchid][center]Thanks for playing :3"
|
||||
fit_content = true
|
||||
|
||||
[node name="ResetButton" type="Button" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Play Again"
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/ResetButton" to="." method="_on_reset_button_pressed"]
|
||||
19
scenes/menu.gd
Normal file
19
scenes/menu.gd
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
extends Control
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
PlayerInventory.hide()
|
||||
Clock.hide()
|
||||
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_play_button_pressed() -> void:
|
||||
PlayerInventory.show()
|
||||
Clock.show()
|
||||
get_tree().change_scene_to_file("res://scenes/workshop.tscn")
|
||||
1
scenes/menu.gd.uid
Normal file
1
scenes/menu.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://4c4k3o0jnmdk
|
||||
97
scenes/menu.tscn
Normal file
97
scenes/menu.tscn
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://dxr1ergmn3ij7"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://4c4k3o0jnmdk" path="res://scenes/menu.gd" id="1_vjb58"]
|
||||
[ext_resource type="Texture2D" uid="uid://b1rs6epjar6mj" path="res://assets/menu.png" id="2_con2f"]
|
||||
|
||||
[node name="Ending" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
script = ExtResource("1_vjb58")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
z_index = -3
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("2_con2f")
|
||||
expand_mode = 3
|
||||
|
||||
[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 = 250
|
||||
theme_override_constants/margin_top = 100
|
||||
theme_override_constants/margin_right = 250
|
||||
theme_override_constants/margin_bottom = 100
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/PanelContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 5
|
||||
theme_override_constants/margin_top = 5
|
||||
theme_override_constants/margin_right = 5
|
||||
theme_override_constants/margin_bottom = 5
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/PanelContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
bbcode_enabled = true
|
||||
text = "[center][font_size=50][wave](title pending)"
|
||||
fit_content = true
|
||||
|
||||
[node name="RichTextLabel2" type="RichTextLabel" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
bbcode_enabled = true
|
||||
text = "[wave][color=orchid][center]Made by Tabby"
|
||||
fit_content = true
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Your goal is to build a botnet of servers so you can take over the internet with catgirls. You have 7 days to loot the ewaste before building management realises what you're up to and you have to escape"
|
||||
horizontal_alignment = 1
|
||||
autowrap_mode = 2
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PlayButton" type="Button" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
modulate = Color(0, 1, 0, 1)
|
||||
layout_mode = 2
|
||||
text = "Play!"
|
||||
|
||||
[node name="RichTextLabel3" type="RichTextLabel" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
bbcode_enabled = true
|
||||
text = "[i]Credits
|
||||
[ul] Playtesting: Maxie, Kane
|
||||
Octodemy's Inventory Tutorial
|
||||
Item Icons: (todo)"
|
||||
fit_content = true
|
||||
|
||||
[node name="HSeparator2" type="HSeparator" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label2" type="Label" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "tip: you can quickly move items between inventories with Shift+Click"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/PlayButton" to="." method="_on_play_button_pressed"]
|
||||
|
|
@ -13,7 +13,7 @@ func _ready() -> void:
|
|||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
if item_slot.item:
|
||||
button.disabled = PlayerInventory.money <= item_cost
|
||||
button.disabled = PlayerInventory.money < item_cost
|
||||
|
||||
func prepare(item : ItemData):
|
||||
item_slot.item = item
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ func _process(delta: float) -> void:
|
|||
pass
|
||||
|
||||
func make_listings():
|
||||
print("building meowbay")
|
||||
#print("building meowbay")
|
||||
for item in RecipeManager.items:
|
||||
if item.can_buy:
|
||||
var new_listing = load("res://shop/listing.tscn").instantiate()
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ var starting_time : int = 200
|
|||
@export var bar : TextureProgressBar
|
||||
@export var timer_text : Label
|
||||
@export var days_text : Label
|
||||
@export var next_button : Button
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
|
|
@ -17,6 +18,11 @@ func _process(delta: float) -> void:
|
|||
bar.value = (starting_time-time_left)/float(starting_time)
|
||||
timer_text.text = str(time_left)
|
||||
days_text.text = str(days_left)
|
||||
next_button.disabled = time_left > 10
|
||||
if days_left == 0:
|
||||
next_button.text = "End Game"
|
||||
else:
|
||||
next_button.text = "Proceed to next day ->"
|
||||
|
||||
func has_time(time : float) -> bool:
|
||||
return time_left >= time
|
||||
|
|
@ -26,5 +32,11 @@ func use_time(time : float):
|
|||
|
||||
|
||||
func _on_next_day_pressed() -> void:
|
||||
days_left -= 1
|
||||
time_left = 200
|
||||
if days_left >= 1:
|
||||
days_left -= 1
|
||||
time_left = 200
|
||||
else:
|
||||
get_tree().change_scene_to_file("res://scenes/ending.tscn")
|
||||
PlayerInventory.hide()
|
||||
Clock.hide()
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
[sub_resource type="LabelSettings" id="LabelSettings_r3ygl"]
|
||||
font_size = 32
|
||||
|
||||
[node name="Clock" type="Control" node_paths=PackedStringArray("bar", "timer_text", "days_text")]
|
||||
[node name="Clock" type="Control" node_paths=PackedStringArray("bar", "timer_text", "days_text", "next_button")]
|
||||
z_index = 2
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
|
|
@ -21,6 +21,7 @@ script = ExtResource("1_m6rn1")
|
|||
bar = NodePath("PanelContainer/VBoxContainer/HBoxContainer/TextureProgressBar")
|
||||
timer_text = NodePath("PanelContainer/VBoxContainer/HBoxContainer/TextureProgressBar/PanelContainer/Label")
|
||||
days_text = NodePath("PanelContainer/VBoxContainer/HBoxContainer/VBoxContainer/Label")
|
||||
next_button = NodePath("PanelContainer/VBoxContainer/NextDay")
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="."]
|
||||
layout_mode = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue