1
Fork 0
mirror of https://github.com/Cookie-CHR/OfficeMadness-LD51.git synced 2024-11-24 15:44:18 +00:00

⚙️ Cleanup + made game harder

This commit is contained in:
Cookie-CHR 2022-10-03 01:26:06 +02:00
parent 0a48efa388
commit 861d4ef584
7 changed files with 49 additions and 8 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=2]
[gd_scene load_steps=11 format=2]
[ext_resource path="res://Scripts/Play.gd" type="Script" id=1]
[ext_resource path="res://Sprites/Play_again_button.png" type="Texture" id=2]
@ -7,11 +7,17 @@
[ext_resource path="res://Sprites/Ending.png" type="Texture" id=5]
[ext_resource path="res://Music/Music_Changer.gd" type="Script" id=6]
[ext_resource path="res://Sprites/Music_On.png" type="Texture" id=7]
[ext_resource path="res://Fonts/Life is goofy.ttf" type="DynamicFontData" id=8]
[sub_resource type="DynamicFont" id=1]
size = 80
font_data = ExtResource( 4 )
[sub_resource type="DynamicFont" id=2]
size = 35
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 8 )
[node name="Panel" type="Panel"]
margin_right = 1024.0
margin_bottom = 600.0
@ -58,3 +64,24 @@ margin_right = 187.0
margin_bottom = 117.0
icon = ExtResource( 7 )
flat = true
[node name="Label2" type="Label" parent="."]
modulate = Color( 0, 0, 0, 1 )
margin_left = 302.0
margin_top = 160.0
margin_right = 681.0
margin_bottom = 577.0
custom_fonts/font = SubResource( 2 )
text = "Music by Kevin Macleod (incompetech.com)
Sound by FreeSound
Made by Cookie-CHR for Ludum Dare 51"

View file

@ -10,12 +10,14 @@ var r_file = preload("res://Sprites/Chosen_file.png")
# Called when the node enters the scene tree for the first time.
func _ready():
var count_files = 28
var rows = min(3+int(0.02*GlobalTimer.seconds_passed), 4)
var columns = min(6+int(0.15*GlobalTimer.seconds_passed), 7)
var count_files = rows*columns
for i in range(count_files):
var button = TextureButton.new()
add_child(button)
button.set_position(Vector2((i%7)*90+35, (i/7)*82+160))
button.set_position(Vector2((i%columns)*90+35*(8-columns), (i/columns)*82+160))
button.texture_normal = w_file
button.name = str(i)

View file

@ -12,12 +12,14 @@ var count_viruses = 0
# Called when the node enters the scene tree for the first time.
func _ready():
var count_files = 40
var rows = min(4+int(0.02*GlobalTimer.seconds_passed), 5)
var columns = min(7+int(0.15*GlobalTimer.seconds_passed), 8)
var count_files = rows*columns
for i in range(count_files):
var button = TextureButton.new()
add_child(button)
button.set_position(Vector2((i%8)*80+35, (i/8)*75+140))
button.set_position(Vector2((i%columns)*80+35*(9-columns), (i/columns)*75+140))
var r = randi()%5
if r<=1:
button.texture_normal = virus

View file

@ -9,7 +9,7 @@ var ascii_letters_and_digits = "abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ
# Called when the node enters the scene tree for the first time.
func _ready():
password = gen_unique_str(10)
password = gen_unique_str(floor(8+0.02*GlobalTimer.seconds_passed))
get_node("Label").text = password
pass # Replace with function body.

View file

@ -5,7 +5,7 @@ var finished = false
# Called when the node enters the scene tree for the first time.
func _ready():
value = 0
max_value = 200
max_value = 200 + 0.2*GlobalTimer.seconds_passed
func _process(delta):
if not finished:
@ -13,7 +13,7 @@ func _process(delta):
finished = true
MManager.on_finished()
else:
self.value -= delta*20
self.value -= (delta+0.0001*GlobalTimer.seconds_passed)*20
func boost():
value +=10

9
Scripts/Timer.tscn Normal file
View file

@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Scripts/TimePassed.gd" type="Script" id=1]
[node name="Timer" type="Timer"]
autostart = true
script = ExtResource( 1 )
[connection signal="timeout" from="." to="." method="_on_Timer_timeout"]

View file

@ -19,6 +19,7 @@ config/icon="res://icon.png"
MManager="*res://Scripts/M_manager.gd"
MusicPlayer="*res://Music/MusicPlayer.tscn"
Muter="*res://Music/Muter.gd"
GlobalTimer="*res://Scripts/Timer.tscn"
[input]