diff --git a/Scenes/Ending.tscn b/Scenes/Ending.tscn index eded16c..0a2f000 100644 --- a/Scenes/Ending.tscn +++ b/Scenes/Ending.tscn @@ -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" diff --git a/Scenes/Minigames/1.gd b/Scenes/Minigames/1.gd index cd56a09..8a542f5 100644 --- a/Scenes/Minigames/1.gd +++ b/Scenes/Minigames/1.gd @@ -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) diff --git a/Scenes/Minigames/3.gd b/Scenes/Minigames/3.gd index 4dc5875..42cf9ea 100644 --- a/Scenes/Minigames/3.gd +++ b/Scenes/Minigames/3.gd @@ -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 diff --git a/Scenes/Minigames/4.gd b/Scenes/Minigames/4.gd index 4867e49..6f1eba8 100644 --- a/Scenes/Minigames/4.gd +++ b/Scenes/Minigames/4.gd @@ -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. diff --git a/Scripts/ProgressBar.gd b/Scripts/ProgressBar.gd index 5f800f0..57dff61 100644 --- a/Scripts/ProgressBar.gd +++ b/Scripts/ProgressBar.gd @@ -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 diff --git a/Scripts/Timer.tscn b/Scripts/Timer.tscn new file mode 100644 index 0000000..d7eac07 --- /dev/null +++ b/Scripts/Timer.tscn @@ -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"] diff --git a/project.godot b/project.godot index 934ca1f..109a0ef 100644 --- a/project.godot +++ b/project.godot @@ -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]