diff --git a/assets/colorpalette.aseprite b/assets/colorpalette.aseprite new file mode 100644 index 0000000..8cc5d7b Binary files /dev/null and b/assets/colorpalette.aseprite differ diff --git a/assets/colorpalette.aseprite.import b/assets/colorpalette.aseprite.import new file mode 100644 index 0000000..7233105 --- /dev/null +++ b/assets/colorpalette.aseprite.import @@ -0,0 +1,26 @@ +[remap] + +importer="aseprite.wizard.plugin" +type="SpriteFrames" +path="res://.import/colorpalette.aseprite-3b8c293b99ae840c90fa69d75a3d2157.res" + +[deps] + +source_file="res://assets/colorpalette.aseprite" +dest_files=[ "res://.import/colorpalette.aseprite-3b8c293b99ae840c90fa69d75a3d2157.res" ] + +[params] + +split_layers=false +exclude_layers_pattern="" +only_visible_layers=false +sheet_type="Packed" +sprite_filename_pattern="{basename}.{layer}.{extension}" +texture_strip/import_texture_strip=false +texture_strip/filename_pattern="{basename}.{layer}.Strip.{extension}" +texture_atlas/import_texture_atlas=false +texture_atlas/filename_pattern="{basename}.{layer}.Atlas.{extension}" +texture_atlas/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Atlas.{extension}" +animated_texture/import_animated_texture=false +animated_texture/filename_pattern="{basename}.{layer}.{animation}.Texture.{extension}" +animated_texture/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Texture.{extension}" diff --git a/assets/contraption/elevator.aseprite b/assets/contraption/elevator.aseprite new file mode 100644 index 0000000..5c6e521 Binary files /dev/null and b/assets/contraption/elevator.aseprite differ diff --git a/assets/contraption/elevator.aseprite.import b/assets/contraption/elevator.aseprite.import new file mode 100644 index 0000000..ef26b3f --- /dev/null +++ b/assets/contraption/elevator.aseprite.import @@ -0,0 +1,26 @@ +[remap] + +importer="aseprite.wizard.plugin" +type="SpriteFrames" +path="res://.import/elevator.aseprite-8c707d19cad550326b8c8172c95cd459.res" + +[deps] + +source_file="res://assets/contraption/elevator.aseprite" +dest_files=[ "res://.import/elevator.aseprite-8c707d19cad550326b8c8172c95cd459.res" ] + +[params] + +split_layers=false +exclude_layers_pattern="" +only_visible_layers=false +sheet_type="Packed" +sprite_filename_pattern="{basename}.{layer}.{extension}" +texture_strip/import_texture_strip=false +texture_strip/filename_pattern="{basename}.{layer}.Strip.{extension}" +texture_atlas/import_texture_atlas=false +texture_atlas/filename_pattern="{basename}.{layer}.Atlas.{extension}" +texture_atlas/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Atlas.{extension}" +animated_texture/import_animated_texture=false +animated_texture/filename_pattern="{basename}.{layer}.{animation}.Texture.{extension}" +animated_texture/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Texture.{extension}" diff --git a/assets/neutral object/button.aseprite b/assets/neutral object/button.aseprite new file mode 100644 index 0000000..a63ffbb Binary files /dev/null and b/assets/neutral object/button.aseprite differ diff --git a/assets/neutral object/button.aseprite.import b/assets/neutral object/button.aseprite.import new file mode 100644 index 0000000..939319e --- /dev/null +++ b/assets/neutral object/button.aseprite.import @@ -0,0 +1,26 @@ +[remap] + +importer="aseprite.wizard.plugin" +type="SpriteFrames" +path="res://.import/button.aseprite-eb4ffd06c959b926c360b58c2a20bdb1.res" + +[deps] + +source_file="res://assets/neutral object/button.aseprite" +dest_files=[ "res://.import/button.aseprite-eb4ffd06c959b926c360b58c2a20bdb1.res" ] + +[params] + +split_layers=false +exclude_layers_pattern="" +only_visible_layers=false +sheet_type="Packed" +sprite_filename_pattern="{basename}.{layer}.{extension}" +texture_strip/import_texture_strip=false +texture_strip/filename_pattern="{basename}.{layer}.Strip.{extension}" +texture_atlas/import_texture_atlas=false +texture_atlas/filename_pattern="{basename}.{layer}.Atlas.{extension}" +texture_atlas/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Atlas.{extension}" +animated_texture/import_animated_texture=false +animated_texture/filename_pattern="{basename}.{layer}.{animation}.Texture.{extension}" +animated_texture/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Texture.{extension}" diff --git a/assets/neutral object/buttonStateIndicator.aseprite b/assets/neutral object/buttonStateIndicator.aseprite new file mode 100644 index 0000000..ba53a8e Binary files /dev/null and b/assets/neutral object/buttonStateIndicator.aseprite differ diff --git a/assets/neutral object/buttonStateIndicator.aseprite.import b/assets/neutral object/buttonStateIndicator.aseprite.import new file mode 100644 index 0000000..c2e32fb --- /dev/null +++ b/assets/neutral object/buttonStateIndicator.aseprite.import @@ -0,0 +1,26 @@ +[remap] + +importer="aseprite.wizard.plugin" +type="SpriteFrames" +path="res://.import/buttonStateIndicator.aseprite-806b0eadbb43e41e786dd7af47b87bad.res" + +[deps] + +source_file="res://assets/neutral object/buttonStateIndicator.aseprite" +dest_files=[ "res://.import/buttonStateIndicator.aseprite-806b0eadbb43e41e786dd7af47b87bad.res" ] + +[params] + +split_layers=false +exclude_layers_pattern="" +only_visible_layers=false +sheet_type="Packed" +sprite_filename_pattern="{basename}.{layer}.{extension}" +texture_strip/import_texture_strip=false +texture_strip/filename_pattern="{basename}.{layer}.Strip.{extension}" +texture_atlas/import_texture_atlas=false +texture_atlas/filename_pattern="{basename}.{layer}.Atlas.{extension}" +texture_atlas/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Atlas.{extension}" +animated_texture/import_animated_texture=false +animated_texture/filename_pattern="{basename}.{layer}.{animation}.Texture.{extension}" +animated_texture/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Texture.{extension}" diff --git a/src/Actors/Blobby/Blobby.gd b/src/Actors/Blobby/Blobby.gd index fcbea59..3c0e42f 100644 --- a/src/Actors/Blobby/Blobby.gd +++ b/src/Actors/Blobby/Blobby.gd @@ -1,6 +1,7 @@ extends Player const PhysicsFunc = preload("res://src/Utilities/Physic/PhysicsFunc.gd") export var jump_buffer_filled := false +#TODO Switch to new unique node name method for referencing onready var left_wall_raycasts = $WallRaycasts/LeftWallRaycast onready var right_wall_raycasts = $WallRaycasts/RightWallRaycast onready var player_state_machine = $BlobbyStateMachine diff --git a/src/Actors/Blobby/Blobby.tscn b/src/Actors/Blobby/Blobby.tscn index ae04635..0643a44 100644 --- a/src/Actors/Blobby/Blobby.tscn +++ b/src/Actors/Blobby/Blobby.tscn @@ -251,6 +251,7 @@ switch_mode = 2 auto_advance = true [sub_resource type="AnimationNodeStateMachineTransition" id=178] +priority = 0 [sub_resource type="AnimationNodeStateMachineTransition" id=137] @@ -266,9 +267,9 @@ states/idleTurn/position = Vector2( 1375.54, -193.991 ) states/idling/node = SubResource( 116 ) states/idling/position = Vector2( 1375.54, -54 ) states/jumpToFall/node = SubResource( 119 ) -states/jumpToFall/position = Vector2( 1795.54, 311.009 ) +states/jumpToFall/position = Vector2( 1795.54, 343.009 ) states/jumping/node = SubResource( 125 ) -states/jumping/position = Vector2( 1375.54, 129.009 ) +states/jumping/position = Vector2( 1375.54, 117.009 ) states/runToJump/node = SubResource( 146 ) states/runToJump/position = Vector2( 1191.54, 36 ) states/running/node = SubResource( 122 ) @@ -278,12 +279,12 @@ states/turnToRun/position = Vector2( 1795.54, -308.991 ) states/walking/node = SubResource( 133 ) states/walking/position = Vector2( 1795.54, -54 ) states/wallslideToJump/node = SubResource( 136 ) -states/wallslideToJump/position = Vector2( 1566.54, 380.009 ) +states/wallslideToJump/position = Vector2( 1375.54, 343.009 ) states/wallsliding/node = SubResource( 96 ) -states/wallsliding/position = Vector2( 1788.54, 501.009 ) +states/wallsliding/position = Vector2( 1795.54, 493.009 ) transitions = [ "falling", "wallsliding", SubResource( 138 ), "wallsliding", "idling", SubResource( 139 ), "wallsliding", "wallslideToJump", SubResource( 140 ), "wallslideToJump", "jumping", SubResource( 141 ), "idling", "jumping", SubResource( 147 ), "runToJump", "jumping", SubResource( 148 ), "ducking", "jumping", SubResource( 149 ), "jumping", "jumpToFall", SubResource( 150 ), "jumpToFall", "falling", SubResource( 151 ), "ducking", "duckTurn", SubResource( 152 ), "duckTurn", "ducking", SubResource( 153 ), "falling", "ducking", SubResource( 154 ), "ducking", "falling", SubResource( 155 ), "ducking", "walking", SubResource( 156 ), "walking", "ducking", SubResource( 157 ), "idling", "ducking", SubResource( 158 ), "ducking", "idling", SubResource( 159 ), "ducking", "running", SubResource( 160 ), "running", "ducking", SubResource( 161 ), "running", "falling", SubResource( 162 ), "falling", "running", SubResource( 163 ), "walking", "falling", SubResource( 164 ), "falling", "walking", SubResource( 165 ), "falling", "idling", SubResource( 166 ), "idling", "walking", SubResource( 167 ), "walking", "idling", SubResource( 168 ), "walking", "turnToRun", SubResource( 169 ), "turnToRun", "walking", SubResource( 170 ), "running", "turnToRun", SubResource( 171 ), "turnToRun", "running", SubResource( 172 ), "idling", "idleTurn", SubResource( 173 ), "walking", "idleTurn", SubResource( 174 ), "idleTurn", "walking", SubResource( 175 ), "idling", "turnToRun", SubResource( 176 ), "turnToRun", "idling", SubResource( 177 ), "running", "runToJump", SubResource( 178 ), "wallsliding", "falling", SubResource( 137 ) ] start_node = "idling" -graph_offset = Vector2( 996.54, -125.991 ) +graph_offset = Vector2( 984.54, -229.991 ) [sub_resource type="AnimationNodeStateMachinePlayback" id=48] @@ -3678,7 +3679,7 @@ tracks/11/keys = { } [sub_resource type="Animation" id=73] -length = 0.2 +length = 0.15 loop = true tracks/0/type = "value" tracks/0/path = NodePath(".:frame") @@ -3827,7 +3828,7 @@ tracks/11/keys = { [sub_resource type="Animation" id=101] resource_name = "wallslideToJumpRight" -length = 0.2 +length = 0.15 loop = true tracks/0/type = "value" tracks/0/path = NodePath(".:frame") diff --git a/src/Levels/TLT Level.tscn b/src/Levels/TLT Level.tscn index 6df537f..a8ef3ce 100644 --- a/src/Levels/TLT Level.tscn +++ b/src/Levels/TLT Level.tscn @@ -1,11 +1,13 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=1] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=2] [ext_resource path="res://src/HarmfulObjects/Spikes.tscn" type="PackedScene" id=3] [ext_resource path="res://src/Contraptions/Platform/FlyingLaserCutter.tscn" type="PackedScene" id=4] [ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=5] +[ext_resource path="res://src/NeutralObjects/Coin.tscn" type="PackedScene" id=6] [ext_resource path="res://src/UserInterface/Buttons/UI.tscn" type="PackedScene" id=7] +[ext_resource path="res://src/NeutralObjects/ThreeWhyButtons.tscn" type="PackedScene" id=8] [sub_resource type="AnimationNodeStateMachinePlayback" id=4] @@ -24,12 +26,37 @@ scale = Vector2( 0.878906, 0.936025 ) parameters/playback = SubResource( 4 ) [node name="FlyingLaserCutter" parent="." instance=ExtResource( 4 )] -visible = false position = Vector2( 80, 80 ) rotation = 1.5708 [node name="Portal" parent="." instance=ExtResource( 5 )] -position = Vector2( 1440, -120 ) +position = Vector2( 1428, -110 ) + +[node name="Collectibles" type="Node2D" parent="."] + +[node name="Coin" parent="Collectibles" instance=ExtResource( 6 )] +position = Vector2( 336, -60 ) +scale = Vector2( 0.133, 0.133 ) + +[node name="Coin2" parent="Collectibles" instance=ExtResource( 6 )] +position = Vector2( 324, -11 ) +scale = Vector2( 0.133, 0.133 ) + +[node name="Coin3" parent="Collectibles" instance=ExtResource( 6 )] +position = Vector2( 1188, -84 ) +scale = Vector2( 0.133, 0.133 ) + +[node name="Coin4" parent="Collectibles" instance=ExtResource( 6 )] +position = Vector2( 1236, -108 ) +scale = Vector2( 0.133, 0.133 ) + +[node name="Coin5" parent="Collectibles" instance=ExtResource( 6 )] +position = Vector2( 1140, -108 ) +scale = Vector2( 0.133, 0.133 ) + +[node name="Coin6" parent="Collectibles" instance=ExtResource( 6 )] +position = Vector2( 696, -48 ) +scale = Vector2( 0.133, 0.133 ) [node name="TileMap" type="TileMap" parent="."] tile_set = ExtResource( 1 ) @@ -39,7 +66,7 @@ cell_custom_transform = Transform2D( 24, 0, 0, 24, 0, 0 ) collision_layer = 8 collision_mask = 8 format = 1 -tile_data = PoolIntArray( -589830, -1610612734, 0, -655299, 2, 0, -524294, -1610612734, 0, -589763, 2, 0, -458758, -1610612734, 0, -524227, 2, 0, -393222, -1610612734, 0, -458691, 2, 0, -327686, -1610612734, 0, -393155, 2, 0, -262150, -1610612734, 0, -327619, 2, 0, -196614, -1610612734, 0, -262088, 2, 0, -262087, 2, 0, -262086, 2, 0, -262085, 2, 0, -262084, 2, 0, -262083, 2, 0, -131078, -1610612734, 0, -196568, 2, 0, -196567, 2, 0, -196566, 2, 0, -196565, 2, 0, -196564, 2, 0, -196563, 2, 0, -196562, 2, 0, -196559, 2, 0, -196556, 2, 0, -196555, 2, 0, -196554, 2, 0, -196553, 2, 0, -196552, 2, 0, -196551, 2, 0, -196550, 2, 0, -196549, 2, 0, -196548, 2, 0, -196547, 2, 0, -65542, -1610612734, 0, -131064, 2, 0, -131063, 2, 0, -131059, 2, 0, -131058, 2, 0, -131054, 2, 0, -131053, 2, 0, -131052, 2, 0, -131051, 2, 0, -131032, 2, 0, -131026, 2, 0, -131020, 2, 0, -131019, 2, 0, -131018, 2, 0, -131017, 2, 0, -131016, 2, 0, -131015, 2, 0, -131014, 2, 0, -131013, 2, 0, -131012, 2, 0, -131011, 2, 0, -6, -1610612734, 0, -65532, 2, 0, -65531, 2, 0, -65530, 2, 0, -65529, 2, 0, -65526, 2, 0, -65519, 2, 0, -65514, 2, 0, -65501, 2, 0, -65500, 2, 0, -65499, 2, 0, -65498, 2, 0, -65497, 2, 0, -65496, 2, 0, -65490, 2, 0, -65489, 2, 0, -65488, 2, 0, -65487, 2, 0, -65486, 2, 0, -65485, 2, 0, -65484, 2, 0, -65483, 2, 0, -65482, 2, 0, -65481, 2, 0, -65480, 2, 0, -65479, 2, 0, -65478, 2, 0, -65477, 2, 0, -65476, 2, 0, -65475, 2, 0, 65530, 3, 0, 65531, 2, 0, 65532, 2, 0, 65533, 2, 0, 65534, 2, 0, 65535, 2, 0, 0, 2, 0, 1, 2, 0, 2, 2, 0, 3, 2, 0, 4, 2, 0, 10, 2, 0, 11, 2, 0, 12, 2, 0, 13, 2, 0, 14, 2, 0, 15, 2, 0, 16, 2, 0, 17, 2, 0, 22, 2, 0, 23, 2, 0, 24, 2, 0, 25, 2, 0, 26, 2, 0, 27, 2, 0, 30, 2, 0, 31, 2, 0, 32, 2, 0, 33, 2, 0, 34, 2, 0, 35, 2, 0 ) +tile_data = PoolIntArray( -786438, -1610612735, 0, -786437, 1610612738, 0, -786436, 1610612738, 0, -786435, 1610612736, 0, -786434, 1610612738, 0, -786433, 1610612738, 0, -851968, 1610612736, 0, -851967, 1610612738, 0, -851966, 1610612738, 0, -851965, 1610612736, 0, -851964, 1610612738, 0, -851963, 1610612738, 0, -851962, 1610612736, 0, -851961, 1610612738, 0, -851960, 1610612738, 0, -851959, 1610612736, 0, -851958, 1610612738, 0, -851957, 1610612738, 0, -851956, 1610612736, 0, -851955, 1610612738, 0, -851954, 1610612738, 0, -851953, 1610612736, 0, -851952, 1610612738, 0, -851951, 1610612738, 0, -851950, 1610612736, 0, -851949, 1610612738, 0, -851948, 1610612738, 0, -851947, 1610612736, 0, -851946, 1610612738, 0, -851945, 1610612738, 0, -851944, 1610612736, 0, -851943, 1610612738, 0, -851942, 1610612738, 0, -851941, 1610612736, 0, -851940, 1610612738, 0, -851939, 1610612738, 0, -851938, 1610612736, 0, -851937, 1610612738, 0, -851936, 1610612738, 0, -851935, 1610612736, 0, -851934, 1610612738, 0, -851933, 1610612738, 0, -851932, 1610612736, 0, -851931, 1610612738, 0, -851930, 1610612738, 0, -851929, 1610612736, 0, -851928, 1610612738, 0, -851927, 1610612738, 0, -851926, 1610612736, 0, -851925, 1610612738, 0, -851924, 1610612738, 0, -851923, 1610612736, 0, -851922, 1610612738, 0, -851921, 1610612738, 0, -851920, 1610612736, 0, -851919, 1610612738, 0, -851918, 1610612738, 0, -851917, 1610612736, 0, -851916, 1610612738, 0, -851915, 1610612738, 0, -851914, 1610612736, 0, -851913, 1610612738, 0, -851912, 1610612738, 0, -851911, 1610612736, 0, -851910, 1610612738, 0, -851909, 1610612738, 0, -851908, 1610612736, 0, -851907, 3, 0, -720902, -1610612734, 0, -786371, -1073741822, 0, -655366, -1610612734, 0, -720835, -1073741824, 0, -589830, -1610612736, 0, -655299, -1073741822, 0, -524294, -1610612734, 0, -589763, -1073741822, 0, -458758, -1610612734, 0, -524227, -1073741824, 0, -393222, -1610612736, 0, -458691, -1073741822, 0, -327686, -1610612734, 0, -393155, -1073741822, 0, -262150, -1610612734, 0, -327619, -1073741824, 0, -196614, -1610612736, 0, -262088, 0, 0, -262087, 2, 0, -262086, 2, 0, -262085, 0, 0, -262084, 2, 0, -262083, 1610612739, 0, -131078, -1610612734, 0, -196568, 0, 0, -196567, 2, 0, -196566, 2, 0, -196565, 0, 0, -196564, 2, 0, -196563, 2, 0, -196562, 0, 0, -196559, 2, 0, -196556, 2, 0, -196555, 0, 0, -196554, 2, 0, -196553, 2, 0, -196552, 1610612739, 0, -196551, 1610612739, 0, -196550, 1610612739, 0, -196549, 1610612739, 0, -196548, 1610612739, 0, -196547, 1610612739, 0, -65542, -1610612734, 0, -131064, 0, 0, -131063, 2, 0, -131059, -1073741822, 0, -131058, -1610612734, 0, -131054, 2, 0, -131053, 2, 0, -131052, 0, 0, -131051, 2, 0, -131032, 1610612739, 0, -131031, 1610612739, 0, -131030, 1610612739, 0, -131029, 1610612739, 0, -131028, 1610612739, 0, -131027, 1610612739, 0, -131026, 1610612739, 0, -131020, 1610612739, 0, -131019, 1610612739, 0, -131018, 1610612739, 0, -131017, 1610612739, 0, -131016, 1, 0, -131015, 1610612739, 0, -131014, 1610612739, 0, -131013, 1, 0, -131012, 1610612739, 0, -131011, 1610612739, 0, -6, -1610612736, 0, -65532, 2, 0, -65531, 0, 0, -65530, 2, 0, -65529, 2, 0, -65528, 1610612739, 0, -65527, 1610612739, 0, -65526, 2, 0, -65519, 0, 0, -65518, 1610612739, 0, -65517, 1610612739, 0, -65516, 1610612739, 0, -65515, 1610612739, 0, -65514, 2, 0, -65501, 2, 0, -65500, 2, 0, -65499, 0, 0, -65498, 2, 0, -65497, 2, 0, -65496, 1, 0, -65495, 1610612739, 0, -65494, 1610612739, 0, -65493, 1, 0, -65492, 1610612739, 0, -65491, 1610612739, 0, -65490, 1, 0, -65489, 2, 0, -65488, 2, 0, -65487, 2, 0, -65486, 2, 0, -65485, 2, 0, -65484, 1610612739, 0, -65483, 1, 0, -65482, 1610612739, 0, -65481, 1610612739, 0, -65480, 1610612739, 0, -65479, 1610612739, 0, -65478, 1610612739, 0, -65477, 1610612739, 0, -65476, 1610612739, 0, -65475, 1610612739, 0, 65530, 3, 0, 65531, 2, 0, 65532, 0, 0, 65533, 2, 0, 65534, 2, 0, 65535, 0, 0, 0, 2, 0, 1, 2, 0, 2, 0, 0, 3, 2, 0, 4, 1610612739, 0, 5, 1610612739, 0, 6, 1610612739, 0, 7, 1610612739, 0, 8, 1610612739, 0, 9, 1610612739, 0, 10, 1610612739, 0, 11, 0, 0, 12, 2, 0, 13, 2, 0, 14, 0, 0, 15, 2, 0, 16, 2, 0, 17, 1610612739, 0, 18, 1610612739, 0, 19, 1610612739, 0, 20, 1610612739, 0, 21, 1610612739, 0, 22, 1610612739, 0, 23, 0, 0, 24, 2, 0, 25, 2, 0, 26, 0, 0, 27, 2, 0, 30, 2, 0, 31, 0, 0, 32, 2, 0, 33, 2, 0, 34, 0, 0, 35, 1610612739, 0, 36, 1610612739, 0, 37, 1610612739, 0, 38, 1610612739, 0, 39, 1610612739, 0, 40, 1610612739, 0, 41, 1610612739, 0, 42, 1610612739, 0, 43, 1610612739, 0, 44, 1610612739, 0, 45, 1610612739, 0, 46, 1610612739, 0, 47, 1610612739, 0, 48, 1610612739, 0, 49, 1610612739, 0, 50, 1610612739, 0, 51, 1610612739, 0, 52, 1610612739, 0, 53, 1610612739, 0, 54, 1610612739, 0, 55, 1610612739, 0, 56, 1, 0, 57, 1610612739, 0, 58, 1610612739, 0, 59, 1, 0, 60, 1610612739, 0, 61, 1610612739, 0 ) [node name="Spikes" parent="TileMap" instance=ExtResource( 3 )] position = Vector2( 708, 12 ) @@ -62,4 +89,23 @@ position = Vector2( 1236, -36 ) [node name="Spikes3" parent="TileMap" instance=ExtResource( 3 )] position = Vector2( 684, 12 ) +[node name="TreeWhyButtons" parent="." instance=ExtResource( 8 )] +position = Vector2( -108, -7 ) + +[node name="WhyButton1" parent="TreeWhyButtons" index="0"] +position = Vector2( -12, -49 ) +rotation = 1.5708 + +[node name="WhyButton2" parent="TreeWhyButtons" index="1"] +position = Vector2( 444, -17 ) +rotation = 3.14159 + +[node name="WhyButton3" parent="TreeWhyButtons" index="2"] +position = Vector2( 1452, -77 ) +rotation = -1.5708 + [editable path="Blobby"] +[editable path="TreeWhyButtons"] +[editable path="TreeWhyButtons/WhyButton1"] +[editable path="TreeWhyButtons/WhyButton2"] +[editable path="TreeWhyButtons/WhyButton3"] diff --git a/src/NeutralObjects/ThreeWhyButtons.gd b/src/NeutralObjects/ThreeWhyButtons.gd new file mode 100644 index 0000000..7c8073d --- /dev/null +++ b/src/NeutralObjects/ThreeWhyButtons.gd @@ -0,0 +1,8 @@ +extends Node2D + +#Is emitted in child nodes +signal child_button_activated(id) + +func _on_TreeWhyButtons_child_button_activated(id: int) -> void: + for button in get_children(): + button.activateIDIndicator(id) diff --git a/src/NeutralObjects/ThreeWhyButtons.tscn b/src/NeutralObjects/ThreeWhyButtons.tscn new file mode 100644 index 0000000..56b67fd --- /dev/null +++ b/src/NeutralObjects/ThreeWhyButtons.tscn @@ -0,0 +1,22 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/NeutralObjects/WhyButton.tscn" type="PackedScene" id=1] +[ext_resource path="res://src/NeutralObjects/ThreeWhyButtons.gd" type="Script" id=2] + +[node name="TreeWhyButtons" type="Node2D"] +script = ExtResource( 2 ) + +[node name="WhyButton1" parent="." instance=ExtResource( 1 )] +buttonID = 1 + +[node name="WhyButton2" parent="." instance=ExtResource( 1 )] +buttonID = 2 + +[node name="WhyButton3" parent="." instance=ExtResource( 1 )] +buttonID = 3 + +[connection signal="child_button_activated" from="." to="." method="_on_TreeWhyButtons_child_button_activated"] + +[editable path="WhyButton1"] +[editable path="WhyButton2"] +[editable path="WhyButton3"] diff --git a/src/NeutralObjects/WhyButton.gd b/src/NeutralObjects/WhyButton.gd new file mode 100644 index 0000000..f0ea3d7 --- /dev/null +++ b/src/NeutralObjects/WhyButton.gd @@ -0,0 +1,27 @@ +extends Node2D + +onready var buttonPlayer = $"%ButtonPlayer" +onready var activatorArea = $"%ActivatorArea" +onready var indicator1Player = $"%Indicator1Player" +onready var indicator2Player = $"%Indicator2Player" +onready var indicator3Player = $"%Indicator3Player" + +export var buttonID: int; + +func selfActivate(): + var selfPlayerString = "indicator"+String(buttonID)+"Player" + get(selfPlayerString).play("onning") + buttonPlayer.play("pushing") + #TODO dis importante + activatorArea.set_deferred("monitoring", false) + +func activateIDIndicator(id: int): + var selfPlayerString = "indicator"+String(id)+"Player" + get(selfPlayerString).play("onning") + +func _on_ActivatorArea_area_entered(_area:Area2D) -> void: + selfActivate() + if get_parent().has_signal("child_button_activated"): + get_parent().emit_signal("child_button_activated", buttonID) + + diff --git a/src/NeutralObjects/WhyButton.tscn b/src/NeutralObjects/WhyButton.tscn new file mode 100644 index 0000000..d3f9f75 --- /dev/null +++ b/src/NeutralObjects/WhyButton.tscn @@ -0,0 +1,212 @@ +[gd_scene load_steps=15 format=2] + +[ext_resource path="res://src/NeutralObjects/WhyButton.gd" type="Script" id=1] + +[sub_resource type="StreamTexture" id=1] +load_path = "res://.import/button.png-6b06252879983e2da39a6ce37483d567.stex" + +[sub_resource type="Animation" id=2] +resource_name = "pushing" +length = 0.5 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = false +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.2, 0.4 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 1, +"values": [ 0.0, 1.0, 2.0 ] +} + +[sub_resource type="StreamTexture" id=5] +load_path = "res://.import/buttonStateIndicator.png-4ad4dfff1d6add183d62f1b602452b7a.stex" + +[sub_resource type="Animation" id=6] +length = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = false +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 0.0 ] +} + +[sub_resource type="Animation" id=8] +resource_name = "onning" +length = 0.6 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = false +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.2, 0.3, 0.5 ), +"transitions": PoolRealArray( 1, 1, 1, 1 ), +"update": 1, +"values": [ 5.0, 2.0, 6.0, 4.0 ] +} + +[sub_resource type="StreamTexture" id=17] +load_path = "res://.import/buttonStateIndicator.png-4ad4dfff1d6add183d62f1b602452b7a.stex" + +[sub_resource type="Animation" id=10] +length = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = false +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 0.0 ] +} + +[sub_resource type="Animation" id=13] +resource_name = "onning" +length = 0.6 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = false +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.2, 0.3, 0.5 ), +"transitions": PoolRealArray( 1, 1, 1, 1 ), +"update": 1, +"values": [ 7.0, 8.0, 6.0, 4.0 ] +} + +[sub_resource type="StreamTexture" id=18] +load_path = "res://.import/buttonStateIndicator.png-4ad4dfff1d6add183d62f1b602452b7a.stex" + +[sub_resource type="Animation" id=14] +length = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = false +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 0.0 ] +} + +[sub_resource type="Animation" id=19] +resource_name = "onning" +length = 0.6 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = false +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.2, 0.3, 0.5 ), +"transitions": PoolRealArray( 1, 1, 1, 1 ), +"update": 1, +"values": [ 1.0, 2.0, 3.0, 4.0 ] +} + +[sub_resource type="RectangleShape2D" id=4] +extents = Vector2( 4, 1 ) + +[sub_resource type="RectangleShape2D" id=3] +extents = Vector2( 6, 1 ) + +[node name="WhyButton" type="Node2D"] +script = ExtResource( 1 ) + +[node name="Button" type="Sprite" parent="."] +position = Vector2( 0, -6 ) +texture = SubResource( 1 ) +hframes = 2 +vframes = 2 +__meta__ = { +"_editor_description_": "YXNlcHJpdGVfd2l6YXJkX2NvbmZpZwpwbGF5ZXJ8PVNwcml0ZS9BbmltYXRpb25QbGF5ZXIKc291cmNlfD1yZXM6Ly9hc3NldHMvbmV1dHJhbCBvYmplY3QvYnV0dG9uLmFzZXByaXRlCmxheWVyfD0Kb3BfZXhwfD1GYWxzZQpvX2ZvbGRlcnw9Cm9fbmFtZXw9Cm9ubHlfdmlzaWJsZXw9RmFsc2UKb19leF9wfD0K" +} + +[node name="ButtonPlayer" type="AnimationPlayer" parent="Button"] +unique_name_in_owner = true +anims/pushing = SubResource( 2 ) + +[node name="Indicator1" type="Sprite" parent="."] +position = Vector2( -3, -1 ) +z_index = 1 +texture = SubResource( 5 ) +hframes = 3 +vframes = 3 +__meta__ = { +"_editor_description_": "YXNlcHJpdGVfd2l6YXJkX2NvbmZpZwpwbGF5ZXJ8PUluZGljYXRvcjEvQW5pbWF0aW9uUGxheWVyCnNvdXJjZXw9cmVzOi8vYXNzZXRzL25ldXRyYWwgb2JqZWN0L2J1dHRvblN0YXRlSW5kaWNhdG9yLmFzZXByaXRlCmxheWVyfD0Kb3BfZXhwfD1GYWxzZQpvX2ZvbGRlcnw9Cm9fbmFtZXw9Cm9ubHlfdmlzaWJsZXw9RmFsc2UKb19leF9wfD0K" +} + +[node name="Indicator1Player" type="AnimationPlayer" parent="Indicator1"] +unique_name_in_owner = true +anims/offing = SubResource( 6 ) +anims/onning = SubResource( 8 ) + +[node name="Indicator2" type="Sprite" parent="."] +position = Vector2( 0, -1 ) +z_index = 1 +texture = SubResource( 17 ) +hframes = 3 +vframes = 3 +__meta__ = { +"_editor_description_": "YXNlcHJpdGVfd2l6YXJkX2NvbmZpZwpwbGF5ZXJ8PUluZGljYXRvcjIvQW5pbWF0aW9uUGxheWVyCnNvdXJjZXw9cmVzOi8vYXNzZXRzL25ldXRyYWwgb2JqZWN0L2J1dHRvblN0YXRlSW5kaWNhdG9yLmFzZXByaXRlCmxheWVyfD0Kb3BfZXhwfD1GYWxzZQpvX2ZvbGRlcnw9Cm9fbmFtZXw9Cm9ubHlfdmlzaWJsZXw9RmFsc2UKb19leF9wfD0K" +} + +[node name="Indicator2Player" type="AnimationPlayer" parent="Indicator2"] +unique_name_in_owner = true +anims/offing = SubResource( 10 ) +anims/onning = SubResource( 13 ) + +[node name="Indicator3" type="Sprite" parent="."] +position = Vector2( 3, -1 ) +z_index = 1 +texture = SubResource( 18 ) +hframes = 3 +vframes = 3 +__meta__ = { +"_editor_description_": "YXNlcHJpdGVfd2l6YXJkX2NvbmZpZwpwbGF5ZXJ8PUluZGljYXRvcjMvQW5pbWF0aW9uUGxheWVyCnNvdXJjZXw9cmVzOi8vYXNzZXRzL25ldXRyYWwgb2JqZWN0L2J1dHRvblN0YXRlSW5kaWNhdG9yLmFzZXByaXRlCmxheWVyfD0Kb3BfZXhwfD1GYWxzZQpvX2ZvbGRlcnw9Cm9fbmFtZXw9Cm9ubHlfdmlzaWJsZXw9RmFsc2UKb19leF9wfD0K" +} + +[node name="Indicator3Player" type="AnimationPlayer" parent="Indicator3"] +unique_name_in_owner = true +anims/offing = SubResource( 14 ) +anims/onning = SubResource( 19 ) + +[node name="ActivatorArea" type="Area2D" parent="."] +unique_name_in_owner = true +position = Vector2( 0, -6 ) +collision_layer = 24 + +[node name="ActivatorAreaShape" type="CollisionShape2D" parent="ActivatorArea"] +unique_name_in_owner = true +position = Vector2( 0, 3 ) +shape = SubResource( 4 ) + +[node name="ButtonBody" type="StaticBody2D" parent="."] +unique_name_in_owner = true +position = Vector2( 0, -6 ) +collision_layer = 24 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="ButtonBody"] +position = Vector2( 0, 5 ) +shape = SubResource( 3 ) + +[connection signal="area_entered" from="ActivatorArea" to="." method="_on_ActivatorArea_area_entered"] diff --git a/src/NeutralObjects/button.png b/src/NeutralObjects/button.png new file mode 100644 index 0000000..237227f Binary files /dev/null and b/src/NeutralObjects/button.png differ diff --git a/src/NeutralObjects/button.png.import b/src/NeutralObjects/button.png.import new file mode 100644 index 0000000..c9529c3 --- /dev/null +++ b/src/NeutralObjects/button.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/button.png-6b06252879983e2da39a6ce37483d567.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/NeutralObjects/button.png" +dest_files=[ "res://.import/button.png-6b06252879983e2da39a6ce37483d567.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=false +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/src/NeutralObjects/buttonStateIndicator.png b/src/NeutralObjects/buttonStateIndicator.png new file mode 100644 index 0000000..0a1c10e Binary files /dev/null and b/src/NeutralObjects/buttonStateIndicator.png differ diff --git a/src/NeutralObjects/buttonStateIndicator.png.import b/src/NeutralObjects/buttonStateIndicator.png.import new file mode 100644 index 0000000..03a22d5 --- /dev/null +++ b/src/NeutralObjects/buttonStateIndicator.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/buttonStateIndicator.png-4ad4dfff1d6add183d62f1b602452b7a.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/NeutralObjects/buttonStateIndicator.png" +dest_files=[ "res://.import/buttonStateIndicator.png-4ad4dfff1d6add183d62f1b602452b7a.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=false +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/src/UserInterface/Screens/LevelEndScreen.tscn b/src/UserInterface/Screens/LevelEndScreen.tscn index 9d8cbb3..09217ce 100644 --- a/src/UserInterface/Screens/LevelEndScreen.tscn +++ b/src/UserInterface/Screens/LevelEndScreen.tscn @@ -36,7 +36,7 @@ size_flags_horizontal = 3 size_flags_vertical = 3 size_flags_stretch_ratio = 0.0 custom_fonts/font = ExtResource( 2 ) -text = "Thank You For Playing!" +text = "Thanks You For Playing!" autowrap = true [node name="StatsLabel" parent="." instance=ExtResource( 6 )]