From 1f27aa12290f698a40621d29d1ccb4caf361e994 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 5 Oct 2020 16:38:54 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A5=20This=20commit=20is=20non-atomic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Objects/{ScrollingObjects => }/Laser.gd | 0 Objects/{ScrollingObjects => }/Laser.tscn | 3 +- Objects/Levels/BuzzsawChoice.tscn | 92 ++++++++ Objects/Levels/Intro.tscn | 87 +++++++ Objects/Levels/Toggles.tscn | 218 ++++++++++++++++++ Objects/Main.tscn | 97 ++------ Objects/ScrollingObjects/Buzzsaw.tscn | 11 +- Objects/ScrollingObjects/Ghosts/GhostBlock.gd | 4 +- .../ScrollingObjects/Ghosts/GhostBlock.tscn | 3 +- Objects/ScrollingObjects/Loop.gd | 1 + Objects/ScrollingObjects/Loop.tscn | 1 + Objects/ScrollingObjects/ScrollingLaser.tscn | 48 ++++ Objects/SpecialObjects/GameStats.tscn | 21 ++ Objects/SpecialObjects/Player.gd | 3 +- 14 files changed, 503 insertions(+), 86 deletions(-) rename Objects/{ScrollingObjects => }/Laser.gd (100%) rename Objects/{ScrollingObjects => }/Laser.tscn (93%) create mode 100644 Objects/Levels/BuzzsawChoice.tscn create mode 100644 Objects/Levels/Intro.tscn create mode 100644 Objects/Levels/Toggles.tscn create mode 100644 Objects/ScrollingObjects/ScrollingLaser.tscn create mode 100644 Objects/SpecialObjects/GameStats.tscn diff --git a/Objects/ScrollingObjects/Laser.gd b/Objects/Laser.gd similarity index 100% rename from Objects/ScrollingObjects/Laser.gd rename to Objects/Laser.gd diff --git a/Objects/ScrollingObjects/Laser.tscn b/Objects/Laser.tscn similarity index 93% rename from Objects/ScrollingObjects/Laser.tscn rename to Objects/Laser.tscn index e5b41f5..0a2dfbe 100644 --- a/Objects/ScrollingObjects/Laser.tscn +++ b/Objects/Laser.tscn @@ -1,11 +1,12 @@ [gd_scene load_steps=6 format=2] [ext_resource path="res://Sprites/laser_gun.png" type="Texture" id=1] -[ext_resource path="res://Objects/ScrollingObjects/Laser.gd" type="Script" id=2] +[ext_resource path="res://Objects/Laser.gd" type="Script" id=2] [ext_resource path="res://Sprites/laser_beam_end.png" type="Texture" id=3] [ext_resource path="res://Sprites/laser_beam_continuous.png" type="Texture" id=4] [ext_resource path="res://Objects/ScrollingObjects/Utilities/RecreatingRectangleShape.tscn" type="PackedScene" id=5] + [node name="Laser" type="Node2D"] script = ExtResource( 2 ) diff --git a/Objects/Levels/BuzzsawChoice.tscn b/Objects/Levels/BuzzsawChoice.tscn new file mode 100644 index 0000000..cc87d74 --- /dev/null +++ b/Objects/Levels/BuzzsawChoice.tscn @@ -0,0 +1,92 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://Sprites/button_right.png" type="Texture" id=4] +[ext_resource path="res://Objects/ScrollingObjects/Ghosts/GhostGroup.tscn" type="PackedScene" id=6] +[ext_resource path="res://Objects/ScrollingObjects/Utilities/ScrollingPipesTileMap.tscn" type="PackedScene" id=7] +[ext_resource path="res://Objects/ScrollingObjects/Buzzsaw.tscn" type="PackedScene" id=8] +[ext_resource path="res://Objects/ScrollingObjects/ScrollingPipe.tscn" type="PackedScene" id=9] +[ext_resource path="res://Objects/ScrollingObjects/Ghosts/GhostBlock.tscn" type="PackedScene" id=10] +[ext_resource path="res://Objects/ScrollingObjects/Buttons/CBSpeedChangeButton.tscn" type="PackedScene" id=12] + +[node name="BuzzsawChoice" type="Node2D"] +position = Vector2( 3800, 0 ) + +[node name="Buzzsaw4" parent="." instance=ExtResource( 8 )] +position = Vector2( -120, 600 ) + +[node name="Buzzsaw" parent="." instance=ExtResource( 8 )] +position = Vector2( 0, 600 ) + +[node name="Buzzsaw2" parent="." instance=ExtResource( 8 )] +position = Vector2( 120, 600 ) + +[node name="Buzzsaw3" parent="." instance=ExtResource( 8 )] +position = Vector2( 240, 600 ) + +[node name="ScrollingPipe3" parent="." instance=ExtResource( 9 )] +position = Vector2( 600, 0 ) + +[node name="TileMap" parent="ScrollingPipe3" instance=ExtResource( 7 )] +position = Vector2( -600, 0 ) +tile_data = PoolIntArray( 851962, 0, 0, 786440, 0, 1, 917498, 0, 65536, 851976, 0, 65536, 983034, 0, 65536, 917512, 0, 65536, 1048570, 0, 65536, 983048, 0, 65536, 1114105, 0, 0, 1114106, 0, 131073, 1048584, 0, 131072, 1048585, 0, 1 ) + +[node name="GhostGroup" parent="." instance=ExtResource( 6 )] +position = Vector2( -180, 500 ) + +[node name="GhostBlock" parent="GhostGroup" instance=ExtResource( 10 )] +is_active = false + +[node name="GhostBlock2" parent="GhostGroup" instance=ExtResource( 10 )] +position = Vector2( 40, 0 ) +is_active = false + +[node name="GhostBlock3" parent="GhostGroup" instance=ExtResource( 10 )] +position = Vector2( 80, 0 ) +is_active = false + +[node name="GhostBlock4" parent="GhostGroup" instance=ExtResource( 10 )] +position = Vector2( 120, 0 ) +is_active = false + +[node name="GhostBlock5" parent="GhostGroup" instance=ExtResource( 10 )] +position = Vector2( 160, 0 ) +is_active = false + +[node name="GhostBlock6" parent="GhostGroup" instance=ExtResource( 10 )] +position = Vector2( 200, 0 ) +is_active = false + +[node name="GhostBlock7" parent="GhostGroup" instance=ExtResource( 10 )] +position = Vector2( 240, 0 ) +is_active = false + +[node name="GhostBlock8" parent="GhostGroup" instance=ExtResource( 10 )] +position = Vector2( 280, 0 ) +is_active = false + +[node name="GhostBlock9" parent="GhostGroup" instance=ExtResource( 10 )] +position = Vector2( 320, 0 ) +is_active = false + +[node name="GhostBlock10" parent="GhostGroup" instance=ExtResource( 10 )] +position = Vector2( 360, 0 ) +is_active = false + +[node name="GhostBlock11" parent="GhostGroup" instance=ExtResource( 10 )] +position = Vector2( 400, 0 ) +is_active = false + +[node name="GhostBlock12" parent="GhostGroup" instance=ExtResource( 10 )] +position = Vector2( 440, 0 ) +is_active = false + +[node name="GhostBlock13" parent="GhostGroup" instance=ExtResource( 10 )] +position = Vector2( 480, 0 ) +is_active = false + +[node name="CBSpeedChangeButton" parent="." instance=ExtResource( 12 )] +position = Vector2( 380, 580 ) +color = Color( 0.7, 1, 0.7, 1 ) +icon = ExtResource( 4 ) +change = 20.0 +[connection signal="clicked" from="CBSpeedChangeButton" to="GhostGroup" method="toggle"] diff --git a/Objects/Levels/Intro.tscn b/Objects/Levels/Intro.tscn new file mode 100644 index 0000000..fc5a4aa --- /dev/null +++ b/Objects/Levels/Intro.tscn @@ -0,0 +1,87 @@ +[gd_scene load_steps=13 format=2] + +[ext_resource path="res://Objects/ScrollingObjects/Buttons/CBSpeedChangeButton.gd" type="Script" id=1] +[ext_resource path="res://Tilesets/Pipes.tres" type="TileSet" id=2] +[ext_resource path="res://Objects/ScrollingObjects/Ghosts/GhostBlock.gd" type="Script" id=3] +[ext_resource path="res://Sprites/button_right.png" type="Texture" id=4] +[ext_resource path="res://Objects/ScrollingObjects/Ghosts/GhostGroup.gd" type="Script" id=5] +[ext_resource path="res://Objects/ScrollingObjects/Loop.tscn" type="PackedScene" id=6] +[ext_resource path="res://Objects/ScrollingObjects/Ghosts/GhostGroup.tscn" type="PackedScene" id=7] +[ext_resource path="res://Objects/ScrollingObjects/Loop.gd" type="Script" id=8] +[ext_resource path="res://Objects/ScrollingObjects/Utilities/ScrollingPipesTileMap.tscn" type="PackedScene" id=9] +[ext_resource path="res://Objects/ScrollingObjects/ScrollingPipe.tscn" type="PackedScene" id=10] +[ext_resource path="res://Objects/ScrollingObjects/Ghosts/GhostBlock.tscn" type="PackedScene" id=11] +[ext_resource path="res://Objects/ScrollingObjects/Buttons/CBSpeedChangeButton.tscn" type="PackedScene" id=12] + +[node name="Intro" type="Node2D"] + +[node name="ScrollingPipe" type="KinematicBody2D" parent="." instance=ExtResource( 10 )] +position = Vector2( 1300, -20 ) +collision_layer = 8 +collision_mask = 2 +motion/sync_to_physics = true + +[node name="TileMap" type="TileMap" parent="ScrollingPipe" instance=ExtResource( 9 )] +position = Vector2( -1140, 660 ) +tile_set = ExtResource( 2 ) +cell_size = Vector2( 40, 40 ) +cell_quadrant_size = 40 +collision_use_kinematic = true +collision_layer = 8 +collision_mask = 2 +format = 1 +tile_data = PoolIntArray( -393205, 0, 0, -393204, 0, 65537, -393200, 0, 65537, -393199, 0, 1, -327669, 0, 65536, -327663, 0, 65536, -262133, 0, 65536, -262127, 0, 65536, -196597, 0, 65536, -196591, 0, 65536, -131065, 0, 0, -131064, 0, 65537, -131063, 0, 65537, -131062, 0, 65537, -131061, 0, 131073, -131055, 0, 131072, -131054, 0, 65537, -131053, 0, 65537, -131052, 0, 65537, -131051, 0, 1, -65534, 0, 0, -65533, 0, 65537, -65532, 0, 1, -65529, 0, 65536, -65515, 0, 65536, 2, 0, 65536, 4, 0, 65536, 7, 0, 65536, 21, 0, 65536 ) + +[node name="CBSpeedChangeButton" type="Area2D" parent="." instance=ExtResource( 12 )] +position = Vector2( 1260, 660 ) +collision_layer = 8 +collision_mask = 2147483648 +script = ExtResource( 1 ) +color = Color( 0, 1, 0, 1 ) +icon = ExtResource( 4 ) +change = 100.0 + +[node name="Loop" type="Area2D" parent="." instance=ExtResource( 6 )] +position = Vector2( 300, 580 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="Loop2" type="Area2D" parent="." instance=ExtResource( 6 )] +position = Vector2( 500, 540 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="Loop3" type="Area2D" parent="." instance=ExtResource( 6 )] +position = Vector2( 740, 380 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="Loop4" type="Area2D" parent="." instance=ExtResource( 6 )] +position = Vector2( 980, 540 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="GhostGroup" type="Node2D" parent="." instance=ExtResource( 7 )] +position = Vector2( 740, 420 ) +script = ExtResource( 5 ) + +[node name="GhostBlock" type="StaticBody2D" parent="GhostGroup" instance=ExtResource( 11 )] +position = Vector2( -40, 0 ) +script = ExtResource( 3 ) + +[node name="GhostBlock2" type="StaticBody2D" parent="GhostGroup" instance=ExtResource( 11 )] +script = ExtResource( 3 ) + +[node name="GhostBlock3" type="StaticBody2D" parent="GhostGroup" instance=ExtResource( 11 )] +position = Vector2( 40, 0 ) +script = ExtResource( 3 ) +[connection signal="clicked" from="CBSpeedChangeButton" to="CBSpeedChangeButton" method="_on_GameButton_clicked"] +[connection signal="input_event" from="CBSpeedChangeButton" to="CBSpeedChangeButton" method="_on_GameButton_input_event"] +[connection signal="body_entered" from="Loop" to="Loop" method="_on_Loop_body_entered"] +[connection signal="body_entered" from="Loop2" to="Loop2" method="_on_Loop_body_entered"] +[connection signal="body_entered" from="Loop3" to="Loop3" method="_on_Loop_body_entered"] +[connection signal="body_entered" from="Loop4" to="Loop4" method="_on_Loop_body_entered"] diff --git a/Objects/Levels/Toggles.tscn b/Objects/Levels/Toggles.tscn new file mode 100644 index 0000000..9a41332 --- /dev/null +++ b/Objects/Levels/Toggles.tscn @@ -0,0 +1,218 @@ +[gd_scene load_steps=12 format=2] + +[ext_resource path="res://Tilesets/Pipes.tres" type="TileSet" id=1] +[ext_resource path="res://Objects/ScrollingObjects/Ghosts/GhostBlock.gd" type="Script" id=2] +[ext_resource path="res://Objects/ScrollingObjects/Ghosts/GhostGroup.gd" type="Script" id=3] +[ext_resource path="res://Objects/ScrollingObjects/Loop.tscn" type="PackedScene" id=4] +[ext_resource path="res://Objects/ScrollingObjects/Buttons/GameButton.tscn" type="PackedScene" id=5] +[ext_resource path="res://Objects/ScrollingObjects/Ghosts/GhostGroup.tscn" type="PackedScene" id=6] +[ext_resource path="res://Objects/ScrollingObjects/Buttons/GameButton.gd" type="Script" id=7] +[ext_resource path="res://Objects/ScrollingObjects/Loop.gd" type="Script" id=8] +[ext_resource path="res://Objects/ScrollingObjects/Utilities/ScrollingPipesTileMap.tscn" type="PackedScene" id=9] +[ext_resource path="res://Objects/ScrollingObjects/ScrollingPipe.tscn" type="PackedScene" id=10] +[ext_resource path="res://Objects/ScrollingObjects/Ghosts/GhostBlock.tscn" type="PackedScene" id=11] + +[node name="Toggles" type="Node2D"] +position = Vector2( 2400, 0 ) + +[node name="ScrollingPipe2" type="KinematicBody2D" parent="." instance=ExtResource( 10 )] +collision_layer = 8 +collision_mask = 2 +motion/sync_to_physics = true + +[node name="TileMap" type="TileMap" parent="ScrollingPipe2" instance=ExtResource( 9 )] +tile_set = ExtResource( 1 ) +cell_size = Vector2( 40, 40 ) +cell_quadrant_size = 40 +collision_use_kinematic = true +collision_layer = 8 +collision_mask = 2 +format = 1 +tile_data = PoolIntArray( 720877, 0, 65536, 720881, 0, 65536, 720885, 0, 65536, 720889, 0, 0, 720890, 0, 65537, 720891, 0, 65537, 720892, 0, 65537, 720893, 0, 1, 786413, 0, 65536, 786417, 0, 65536, 786421, 0, 65536, 786425, 0, 65536, 786429, 0, 65536, 851948, 0, 0, 851949, 0, 131073, 851953, 0, 65536, 851957, 0, 65536, 851961, 0, 65536, 851965, 0, 65536, 917483, 0, 0, 917484, 0, 131073, 917489, 0, 65536, 917493, 0, 65536, 917497, 0, 65536, 917501, 0, 65536, 983018, 0, 0, 983019, 0, 131073, 983025, 0, 65536, 983029, 0, 65536, 983033, 0, 65536, 983037, 0, 65536, 1048553, 0, 0, 1048554, 0, 131073, 1114088, 0, 0, 1114089, 0, 131073 ) + +[node name="Loop5" type="Area2D" parent="." instance=ExtResource( 4 )] +position = Vector2( -580, 380 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="Loop6" type="Area2D" parent="." instance=ExtResource( 4 )] +position = Vector2( -420, 380 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="Loop7" type="Area2D" parent="." instance=ExtResource( 4 )] +position = Vector2( -260, 380 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="Loop17" type="Area2D" parent="." instance=ExtResource( 4 )] +position = Vector2( -100, 380 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="Loop9" type="Area2D" parent="." instance=ExtResource( 4 )] +position = Vector2( -740, 380 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="GhostGroup2" type="Node2D" parent="." instance=ExtResource( 6 )] +position = Vector2( -700, 420 ) +script = ExtResource( 3 ) + +[node name="GameButton" type="Area2D" parent="GhostGroup2" instance=ExtResource( 5 )] +position = Vector2( 200, -160 ) +collision_layer = 8 +collision_mask = 2147483648 +script = ExtResource( 7 ) + +[node name="GameButton2" type="Area2D" parent="GhostGroup2" instance=ExtResource( 5 )] +position = Vector2( 560, 160 ) +collision_layer = 8 +collision_mask = 2147483648 +script = ExtResource( 7 ) +is_active = false + +[node name="GhostBlock" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +script = ExtResource( 2 ) + +[node name="GhostBlock2" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 40, 0 ) +script = ExtResource( 2 ) + +[node name="GhostBlock3" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 80, 0 ) +script = ExtResource( 2 ) + +[node name="GhostBlock4" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 160, 0 ) +script = ExtResource( 2 ) + +[node name="GhostBlock5" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 200, 0 ) +script = ExtResource( 2 ) + +[node name="GhostBlock6" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 240, 0 ) +script = ExtResource( 2 ) + +[node name="GhostBlock7" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 320, 0 ) +script = ExtResource( 2 ) + +[node name="GhostBlock8" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 360, 0 ) +script = ExtResource( 2 ) + +[node name="GhostBlock9" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 400, 0 ) +script = ExtResource( 2 ) + +[node name="GhostBlock10" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 120, 200 ) +script = ExtResource( 2 ) +is_active = false + +[node name="GhostBlock11" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 120, 240 ) +script = ExtResource( 2 ) +is_active = false + +[node name="GhostBlock12" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 280, 200 ) +script = ExtResource( 2 ) +is_active = false + +[node name="GhostBlock13" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 280, 240 ) +script = ExtResource( 2 ) +is_active = false + +[node name="GhostBlock14" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 440, 200 ) +script = ExtResource( 2 ) +is_active = false + +[node name="GhostBlock15" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 440, 240 ) +script = ExtResource( 2 ) +is_active = false + +[node name="GhostBlock16" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 600, 200 ) +script = ExtResource( 2 ) + +[node name="GhostBlock17" type="StaticBody2D" parent="GhostGroup2" instance=ExtResource( 11 )] +position = Vector2( 600, 240 ) +script = ExtResource( 2 ) + +[node name="Loop10" type="Area2D" parent="." instance=ExtResource( 4 )] +position = Vector2( -720, 620 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="Loop11" type="Area2D" parent="." instance=ExtResource( 4 )] +position = Vector2( -700, 640 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="Loop12" type="Area2D" parent="." instance=ExtResource( 4 )] +position = Vector2( -680, 620 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="Loop13" type="Area2D" parent="." instance=ExtResource( 4 )] +position = Vector2( -680, 660 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="Loop8" type="Area2D" parent="." instance=ExtResource( 4 )] +position = Vector2( -720, 660 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="Loop14" type="Area2D" parent="." instance=ExtResource( 4 )] +position = Vector2( -340, 660 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="Loop15" type="Area2D" parent="." instance=ExtResource( 4 )] +position = Vector2( -500, 660 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) + +[node name="Loop16" type="Area2D" parent="." instance=ExtResource( 4 )] +position = Vector2( -180, 660 ) +collision_layer = 32 +collision_mask = 2 +script = ExtResource( 8 ) +[connection signal="body_entered" from="Loop5" to="Loop5" method="_on_Loop_body_entered"] +[connection signal="body_entered" from="Loop6" to="Loop6" method="_on_Loop_body_entered"] +[connection signal="body_entered" from="Loop7" to="Loop7" method="_on_Loop_body_entered"] +[connection signal="body_entered" from="Loop17" to="Loop17" method="_on_Loop_body_entered"] +[connection signal="body_entered" from="Loop9" to="Loop9" method="_on_Loop_body_entered"] +[connection signal="clicked" from="GhostGroup2/GameButton" to="GhostGroup2" method="toggle"] +[connection signal="clicked" from="GhostGroup2/GameButton" to="GhostGroup2/GameButton" method="_on_GameButton_clicked"] +[connection signal="input_event" from="GhostGroup2/GameButton" to="GhostGroup2/GameButton" method="_on_GameButton_input_event"] +[connection signal="clicked" from="GhostGroup2/GameButton2" to="GhostGroup2" method="toggle"] +[connection signal="clicked" from="GhostGroup2/GameButton2" to="GhostGroup2/GameButton2" method="_on_GameButton_clicked"] +[connection signal="input_event" from="GhostGroup2/GameButton2" to="GhostGroup2/GameButton2" method="_on_GameButton_input_event"] +[connection signal="body_entered" from="Loop10" to="Loop10" method="_on_Loop_body_entered"] +[connection signal="body_entered" from="Loop11" to="Loop11" method="_on_Loop_body_entered"] +[connection signal="body_entered" from="Loop12" to="Loop12" method="_on_Loop_body_entered"] +[connection signal="body_entered" from="Loop13" to="Loop13" method="_on_Loop_body_entered"] +[connection signal="body_entered" from="Loop8" to="Loop8" method="_on_Loop_body_entered"] +[connection signal="body_entered" from="Loop14" to="Loop14" method="_on_Loop_body_entered"] +[connection signal="body_entered" from="Loop15" to="Loop15" method="_on_Loop_body_entered"] +[connection signal="body_entered" from="Loop16" to="Loop16" method="_on_Loop_body_entered"] diff --git a/Objects/Main.tscn b/Objects/Main.tscn index e5c73d5..c16d52c 100644 --- a/Objects/Main.tscn +++ b/Objects/Main.tscn @@ -5,12 +5,12 @@ [ext_resource path="res://Objects/ConveyorBelt/ConveyorBelt.tscn" type="PackedScene" id=3] [ext_resource path="res://Objects/SpecialObjects/SingleScreenWalls.tscn" type="PackedScene" id=4] [ext_resource path="res://Objects/SpecialObjects/Wrapper.tscn" type="PackedScene" id=5] -[ext_resource path="res://Objects/ScrollingObjects/ScrollingBlock.tscn" type="PackedScene" id=6] -[ext_resource path="res://Objects/ScrollingObjects/Loop.tscn" type="PackedScene" id=7] -[ext_resource path="res://Objects/ScrollingObjects/Buttons/GameButton.tscn" type="PackedScene" id=8] -[ext_resource path="res://Objects/ScrollingObjects/Buttons/GameButtonChain.tscn" type="PackedScene" id=9] +[ext_resource path="res://Objects/Levels/BuzzsawChoice.tscn" type="PackedScene" id=6] [ext_resource path="res://Objects/SpecialObjects/Clock.tscn" type="PackedScene" id=10] -[ext_resource path="res://Objects/ScrollingObjects/Laser.tscn" type="PackedScene" id=11] +[ext_resource path="res://Objects/Laser.tscn" type="PackedScene" id=11] +[ext_resource path="res://Objects/Levels/Intro.tscn" type="PackedScene" id=12] +[ext_resource path="res://Objects/Levels/Toggles.tscn" type="PackedScene" id=15] +[ext_resource path="res://Objects/ScrollingObjects/Press.tscn" type="PackedScene" id=16] [node name="Main" type="Node2D"] __meta__ = { @@ -18,84 +18,31 @@ __meta__ = { } [node name="Conductor" parent="." instance=ExtResource( 2 )] +song_bpm = 60.0 [node name="Wrapper" parent="." instance=ExtResource( 5 )] -total_length = 2000.0 +total_length = 10000.0 [node name="SingleScreenWalls" parent="." instance=ExtResource( 4 )] [node name="ConveyorBelt" parent="." instance=ExtResource( 3 )] position = Vector2( 640, 700 ) +cb_speed = 0.0 -[node name="Player" parent="." instance=ExtResource( 1 )] -position = Vector2( 360, 640 ) - -[node name="ScrollingBlock" parent="." instance=ExtResource( 6 )] -position = Vector2( 660, 480 ) - -[node name="ScrollingBlock2" parent="." instance=ExtResource( 6 )] -position = Vector2( 700, 480 ) - -[node name="ScrollingBlock3" parent="." instance=ExtResource( 6 )] -position = Vector2( 540, 480 ) - -[node name="ScrollingBlock4" parent="." instance=ExtResource( 6 )] -position = Vector2( 620, 480 ) - -[node name="ScrollingBlock5" parent="." instance=ExtResource( 6 )] -position = Vector2( 740, 480 ) - -[node name="ScrollingBlock6" parent="." instance=ExtResource( 6 )] -position = Vector2( 580, 480 ) - -[node name="Loop" parent="." instance=ExtResource( 7 )] -position = Vector2( 520, 560 ) - -[node name="Loop2" parent="." instance=ExtResource( 7 )] -position = Vector2( 580, 560 ) - -[node name="Loop3" parent="." instance=ExtResource( 7 )] -position = Vector2( 640, 560 ) - -[node name="Loop4" parent="." instance=ExtResource( 7 )] -position = Vector2( 700, 560 ) - -[node name="Loop5" parent="." instance=ExtResource( 7 )] -position = Vector2( 760, 560 ) - -[node name="Loop6" parent="." instance=ExtResource( 7 )] -position = Vector2( 520, 620 ) - -[node name="Loop7" parent="." instance=ExtResource( 7 )] -position = Vector2( 580, 620 ) - -[node name="Loop8" parent="." instance=ExtResource( 7 )] -position = Vector2( 640, 620 ) - -[node name="Loop9" parent="." instance=ExtResource( 7 )] -position = Vector2( 700, 620 ) - -[node name="Loop10" parent="." instance=ExtResource( 7 )] -position = Vector2( 760, 620 ) - -[node name="GameButtonChain" parent="." instance=ExtResource( 9 )] -position = Vector2( 860, 660 ) - -[node name="GameButton" parent="GameButtonChain" instance=ExtResource( 8 )] - -[node name="GameButton2" parent="GameButtonChain" instance=ExtResource( 8 )] -position = Vector2( 40, 0 ) - -[node name="GameButton3" parent="GameButtonChain" instance=ExtResource( 8 )] -position = Vector2( 80, 0 ) - -[node name="GameButton4" parent="GameButtonChain" instance=ExtResource( 8 )] -position = Vector2( 120, 0 ) -color = Color( 0.956863, 0.196078, 0.0941176, 1 ) - -[node name="Laser2" parent="." instance=ExtResource( 11 )] -position = Vector2( 640, 300 ) +[node name="LeftLaser" parent="." instance=ExtResource( 11 )] +position = Vector2( 20, 160 ) [node name="Clock" parent="." instance=ExtResource( 10 )] position = Vector2( 40, 40 ) -[connection signal="clicked" from="GameButtonChain/GameButton4" to="Laser2" method="deactivate"] + +[node name="Player" parent="." instance=ExtResource( 1 )] +position = Vector2( 140, 660 ) + +[node name="Intro" parent="." instance=ExtResource( 12 )] + +[node name="Toggles" parent="." instance=ExtResource( 15 )] + +[node name="Press" parent="." instance=ExtResource( 16 )] +position = Vector2( 2900, 0 ) + +[node name="BuzzsawChoice" parent="." instance=ExtResource( 6 )] diff --git a/Objects/ScrollingObjects/Buzzsaw.tscn b/Objects/ScrollingObjects/Buzzsaw.tscn index 8fcebf8..3215a36 100644 --- a/Objects/ScrollingObjects/Buzzsaw.tscn +++ b/Objects/ScrollingObjects/Buzzsaw.tscn @@ -5,7 +5,6 @@ [ext_resource path="res://Objects/ScrollingObjects/Utilities/ConveyorScrollParent.tscn" type="PackedScene" id=3] [ext_resource path="res://Objects/ScrollingObjects/Utilities/WrapParent.tscn" type="PackedScene" id=4] - [sub_resource type="CircleShape2D" id=1] radius = 71.9263 @@ -28,13 +27,15 @@ tracks/0/keys = { [node name="Buzzsaw" type="Area2D"] script = ExtResource( 2 ) -[node name="Sprite" type="Sprite" parent="."] -rotation = 3.58744 -texture = ExtResource( 1 ) - [node name="CollisionShape2D" type="CollisionShape2D" parent="."] +z_index = 2 shape = SubResource( 1 ) +[node name="Sprite" type="Sprite" parent="."] +rotation = 6.28319 +z_index = 1 +texture = ExtResource( 1 ) + [node name="AnimationPlayer" type="AnimationPlayer" parent="."] anims/SpinClockwise = SubResource( 2 ) diff --git a/Objects/ScrollingObjects/Ghosts/GhostBlock.gd b/Objects/ScrollingObjects/Ghosts/GhostBlock.gd index e0361fb..c7ad492 100644 --- a/Objects/ScrollingObjects/Ghosts/GhostBlock.gd +++ b/Objects/ScrollingObjects/Ghosts/GhostBlock.gd @@ -1,8 +1,8 @@ extends Node2D class_name GhostBlock -var active_sprite: Texture = preload("res://Sprites/ghost_block_active.png") -var inactive_sprite: Texture = preload("res://Sprites/ghost_block_inactive.png") +var active_sprite: Texture = preload("res://Sprites/block_ON.png") +var inactive_sprite: Texture = preload("res://Sprites/block_OFF.png") export(bool) var is_active: bool = true setget set_active diff --git a/Objects/ScrollingObjects/Ghosts/GhostBlock.tscn b/Objects/ScrollingObjects/Ghosts/GhostBlock.tscn index 0e82574..b06c2f0 100644 --- a/Objects/ScrollingObjects/Ghosts/GhostBlock.tscn +++ b/Objects/ScrollingObjects/Ghosts/GhostBlock.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=6 format=2] [ext_resource path="res://Objects/ScrollingObjects/Ghosts/GhostBlock.gd" type="Script" id=1] -[ext_resource path="res://Sprites/ghost_block_active.png" type="Texture" id=2] +[ext_resource path="res://Sprites/block_OFF.png" type="Texture" id=2] [ext_resource path="res://Objects/ScrollingObjects/Utilities/ConveyorScrollParent.tscn" type="PackedScene" id=3] [ext_resource path="res://Objects/ScrollingObjects/Utilities/WrapParent.tscn" type="PackedScene" id=4] @@ -15,6 +15,7 @@ script = ExtResource( 1 ) texture = ExtResource( 2 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] +visible = false shape = SubResource( 1 ) [node name="ConveyorScrollParent" parent="." instance=ExtResource( 3 )] diff --git a/Objects/ScrollingObjects/Loop.gd b/Objects/ScrollingObjects/Loop.gd index b4f4490..37a8488 100644 --- a/Objects/ScrollingObjects/Loop.gd +++ b/Objects/ScrollingObjects/Loop.gd @@ -14,6 +14,7 @@ func _ready(): func _on_Loop_body_entered(body): emit_signal("picked_up") + body.loops_collected += 1 $AnimationPlayer.play("pop fade out") diff --git a/Objects/ScrollingObjects/Loop.tscn b/Objects/ScrollingObjects/Loop.tscn index 00b6844..3312d2a 100644 --- a/Objects/ScrollingObjects/Loop.tscn +++ b/Objects/ScrollingObjects/Loop.tscn @@ -45,6 +45,7 @@ script = ExtResource( 2 ) texture = ExtResource( 1 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] +visible = false shape = SubResource( 1 ) [node name="ConveyorScrollParent" parent="." instance=ExtResource( 3 )] diff --git a/Objects/ScrollingObjects/ScrollingLaser.tscn b/Objects/ScrollingObjects/ScrollingLaser.tscn new file mode 100644 index 0000000..50674a6 --- /dev/null +++ b/Objects/ScrollingObjects/ScrollingLaser.tscn @@ -0,0 +1,48 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://Sprites/laser_gun.png" type="Texture" id=1] +[ext_resource path="res://Objects/Laser.gd" type="Script" id=2] +[ext_resource path="res://Sprites/laser_beam_end.png" type="Texture" id=3] +[ext_resource path="res://Sprites/laser_beam_continuous.png" type="Texture" id=4] +[ext_resource path="res://Objects/ScrollingObjects/Utilities/RecreatingRectangleShape.tscn" type="PackedScene" id=5] +[ext_resource path="res://Objects/ScrollingObjects/Utilities/WrapParent.tscn" type="PackedScene" id=6] +[ext_resource path="res://Objects/ScrollingObjects/Utilities/ConveyorScrollParent.tscn" type="PackedScene" id=7] + +[node name="Laser" type="Node2D"] +script = ExtResource( 2 ) + +[node name="Beam" type="Area2D" parent="."] + +[node name="Raycast" type="RayCast2D" parent="Beam"] +visible = false +enabled = true +cast_to = Vector2( 0, 720 ) +collision_mask = 29 + +[node name="Continuous" type="Sprite" parent="Beam"] +position = Vector2( -20, 0 ) +scale = Vector2( 1, 0.5 ) +texture = ExtResource( 4 ) +centered = false + +[node name="End" type="Sprite" parent="Beam"] +position = Vector2( 0, 20 ) +texture = ExtResource( 3 ) + +[node name="Upper" type="Sprite" parent="Beam"] +position = Vector2( -20, -20 ) +scale = Vector2( 1, 0.5 ) +texture = ExtResource( 4 ) +centered = false + +[node name="RecreatingRectangleShape" parent="Beam" instance=ExtResource( 5 )] + +[node name="Gun" type="Node2D" parent="."] + +[node name="Sprite" type="Sprite" parent="Gun"] +position = Vector2( 0, -40 ) +texture = ExtResource( 1 ) + +[node name="ConveyorScrollParent" parent="." instance=ExtResource( 7 )] + +[node name="WrapParent" parent="." instance=ExtResource( 6 )] diff --git a/Objects/SpecialObjects/GameStats.tscn b/Objects/SpecialObjects/GameStats.tscn new file mode 100644 index 0000000..54d69bf --- /dev/null +++ b/Objects/SpecialObjects/GameStats.tscn @@ -0,0 +1,21 @@ +[gd_scene load_steps=2 format=2] + +[sub_resource type="GDScript" id=1] +script/source = "extends Node + + +var loops_collected + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass +" + +[node name="GameStats" type="Node"] +script = SubResource( 1 ) diff --git a/Objects/SpecialObjects/Player.gd b/Objects/SpecialObjects/Player.gd index 592edac..ee02772 100644 --- a/Objects/SpecialObjects/Player.gd +++ b/Objects/SpecialObjects/Player.gd @@ -14,7 +14,7 @@ var can_jump: bool = false var jump_buffer: int = 0 var is_quick_falling: bool = false var quick_fall_buffer: int = 0 - +var loops_collected: int = 0 func get_floor(): for slide in get_slide_count(): @@ -29,7 +29,6 @@ func up_normal(): func _process(delta): var actual_speed = speed.y - gravity.y - print("Actual speed: %s" % actual_speed) if Input.is_action_pressed("plr_left"): if actual_speed < 0: $Body.animation = "up_left"