From 8a7df91bc11a862a27e58a0d7620ac6dca8fd197 Mon Sep 17 00:00:00 2001 From: Jakob Feldmann Date: Tue, 15 Nov 2022 20:34:35 +0100 Subject: [PATCH] Scuffed caterpillar enemy --- src/Actors/Blobby/BlobbyCam.gd | 11 +- src/Actors/BlobbyCam.tscn | 2 + src/Actors/Enemies/Beings/Caterpillar.gd | 39 ++++++ src/Actors/Enemies/Beings/Caterpillar.tscn | 70 ++++++++++ src/Levels/02 Level.tscn | 150 +++++---------------- src/Levels/Enemy Test Level.tscn | 6 +- 6 files changed, 155 insertions(+), 123 deletions(-) create mode 100644 src/Actors/Enemies/Beings/Caterpillar.gd create mode 100644 src/Actors/Enemies/Beings/Caterpillar.tscn diff --git a/src/Actors/Blobby/BlobbyCam.gd b/src/Actors/Blobby/BlobbyCam.gd index 2641421..c30db79 100644 --- a/src/Actors/Blobby/BlobbyCam.gd +++ b/src/Actors/Blobby/BlobbyCam.gd @@ -3,7 +3,7 @@ extends Camera2D var horizontal_facing = 0 var vertical_facing = 0 var camera_horizontal_shift = 90 -var camera_vertical_shift = 90 +var camera_vertical_shift = 0 var time: float = 0 onready var tween = $ShiftTween @@ -62,18 +62,18 @@ func _adapt_to_movement(): # TODO Make smarter if(time > 0.1): time = 0.0 - var cam_offset = get_camera_screen_center().x - prev_camera_pos.x - var new_h_facing = sign(cam_offset) + var cam_offset = get_camera_screen_center() - prev_camera_pos + var new_h_facing = sign(cam_offset.x) if new_h_facing != 0 && horizontal_facing != new_h_facing: horizontal_facing = new_h_facing target_offset.x = camera_horizontal_shift * horizontal_facing tween_h = true - # var new_v_facing = sign(get_camera_position().y - prev_camera_pos.y) + # var new_v_facing = sign(cam_offset.y) # if new_v_facing != 0 && vertical_facing != new_v_facing: # vertical_facing = new_v_facing + # target_offset.x = offset.x if !new_h_facing else target_offset.x # target_offset.y = camera_vertical_shift * vertical_facing - # print(target_offset) # tween_v = true prev_camera_pos = get_camera_screen_center() @@ -88,7 +88,6 @@ func _adapt_to_movement(): Tween.TRANS_SINE, Tween.EASE_OUT ) - tween.start() position = blobby.position diff --git a/src/Actors/BlobbyCam.tscn b/src/Actors/BlobbyCam.tscn index e0537c2..0d04f33 100644 --- a/src/Actors/BlobbyCam.tscn +++ b/src/Actors/BlobbyCam.tscn @@ -273,6 +273,8 @@ zoom = Vector2( 0.75, 0.75 ) process_mode = 0 drag_margin_h_enabled = true drag_margin_v_enabled = true +drag_margin_top = 0.0 +drag_margin_bottom = 0.0 editor_draw_screen = false script = ExtResource( 1 ) diff --git a/src/Actors/Enemies/Beings/Caterpillar.gd b/src/Actors/Enemies/Beings/Caterpillar.gd new file mode 100644 index 0000000..36107e7 --- /dev/null +++ b/src/Actors/Enemies/Beings/Caterpillar.gd @@ -0,0 +1,39 @@ +extends Player + +export var score := 100 + +onready var left_rc = $SlopeRaycastLeft +onready var right_rc = $SlopeRaycastRight + +var snap = Vector2.DOWN * 128 + +func _ready() -> void: + set_physics_process(false) + velocity.x = -30 + + +# TODO adapt to groups +func _on_StompDetector_body_entered(body: Node) -> void: + if body.global_position.y > get_node("StompDetector").global_position.y: + return + get_node("EnemyBody").disabled = true + die() + +func _physics_process(delta: float) -> void: + if(left_rc.is_colliding() && right_rc.is_colliding()): + var length_vector: Vector2 = right_rc.get_collision_point() - left_rc.get_collision_point() + rotation = length_vector.angle() + else: + print(rad2deg(rotation)) + rotation += sign(velocity.x) * delta * 1.2 + move_and_slide_with_snap(velocity.rotated(rotation), snap.rotated(rotation), FLOOR_NORMAL, false, 4, PI) + + +func die() -> void: + queue_free() + GlobalState.score += score + +func _on_EnemySkin_area_entered(area:Area2D) -> void: + if area.is_in_group("harmful"): + get_node("EnemyBody").disabled = true + die() diff --git a/src/Actors/Enemies/Beings/Caterpillar.tscn b/src/Actors/Enemies/Beings/Caterpillar.tscn new file mode 100644 index 0000000..24233c4 --- /dev/null +++ b/src/Actors/Enemies/Beings/Caterpillar.tscn @@ -0,0 +1,70 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://assets/enemy/enemy.png" type="Texture" id=1] +[ext_resource path="res://src/Actors/Enemies/Beings/Caterpillar.gd" type="Script" id=2] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 2.72463, 1.17848 ) + +[sub_resource type="RectangleShape2D" id=2] +extents = Vector2( 15, 6.12039 ) + +[sub_resource type="RectangleShape2D" id=3] +extents = Vector2( 15.534, 10.0962 ) + +[node name="Caterpillar" type="KinematicBody2D" groups=["harmful"]] +scale = Vector2( 0.8, 0.8 ) +collision_layer = 2 +collision_mask = 9 +script = ExtResource( 2 ) + +[node name="enemy" type="Sprite" parent="."] +position = Vector2( 0, -1.90735e-06 ) +scale = Vector2( 0.286789, 0.276348 ) +texture = ExtResource( 1 ) + +[node name="VisibilityEnabler2D" type="VisibilityEnabler2D" parent="."] +position = Vector2( 1362.81, -0.138177 ) +scale = Vector2( 15.4865, 1.28502 ) +rect = Rect2( -89, -10, 2, 20 ) +process_parent = true +physics_process_parent = true + +[node name="EnemyBody" type="CollisionShape2D" parent="." groups=["harmful"]] +position = Vector2( 0, 6.48802 ) +scale = Vector2( 5.68128, 5.29182 ) +shape = SubResource( 1 ) + +[node name="SlopeRaycastLeft" type="RayCast2D" parent="."] +position = Vector2( -11.25, 12.5 ) +enabled = true +cast_to = Vector2( 0, 13.75 ) +collision_mask = 8 + +[node name="SlopeRaycastRight" type="RayCast2D" parent="."] +position = Vector2( 11.25, 12.5 ) +enabled = true +cast_to = Vector2( -9.53674e-07, 13.75 ) +collision_mask = 8 + +[node name="StompDetector" type="Area2D" parent="." groups=["weakpoint"]] +modulate = Color( 0, 0.0392157, 1, 1 ) +position = Vector2( 0, -6.44095 ) +collision_layer = 2 +input_pickable = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="StompDetector"] +position = Vector2( -4.76837e-07, 0.561345 ) +shape = SubResource( 2 ) + +[node name="EnemySkin" type="Area2D" parent="." groups=["player"]] +process_priority = -1 +collision_mask = 126 + +[node name="CollisionPolygon2D" type="CollisionShape2D" parent="EnemySkin"] +position = Vector2( -5.68434e-14, 0 ) +scale = Vector2( 1.03, 1.04 ) +shape = SubResource( 3 ) + +[connection signal="body_entered" from="StompDetector" to="." method="_on_StompDetector_body_entered"] +[connection signal="area_entered" from="EnemySkin" to="." method="_on_EnemySkin_area_entered"] diff --git a/src/Levels/02 Level.tscn b/src/Levels/02 Level.tscn index 0265f38..d5a7784 100644 --- a/src/Levels/02 Level.tscn +++ b/src/Levels/02 Level.tscn @@ -1,17 +1,11 @@ -[gd_scene load_steps=14 format=2] +[gd_scene load_steps=8 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/ObstacleObjects/Spikes.tscn" type="PackedScene" id=3] -[ext_resource path="res://src/Contraptions/Triggers/ElevatorButton.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/Contraptions/Platform/DropThroughPlatform.tscn" type="PackedScene" id=3] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=7] -[ext_resource path="res://src/Contraptions/Triggers/ThreeWhyButtons.tscn" type="PackedScene" id=8] -[ext_resource path="res://src/Levels/Grass Test Level.tscn" type="PackedScene" id=9] [ext_resource path="res://src/Utilities/GameplaySignalManager.gd" type="Script" id=10] [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=12] -[ext_resource path="res://src/Environment/ShaderGrass.tscn" type="PackedScene" id=13] [sub_resource type="AnimationNodeStateMachinePlayback" id=4] @@ -27,14 +21,10 @@ __meta__ = { wait_time = 20.0 [node name="BlobbyCam" parent="." instance=ExtResource( 12 )] -drag_margin_left = 0.0 -drag_margin_top = 0.0 -drag_margin_right = 0.0 -drag_margin_bottom = 0.0 [node name="Blobby" parent="." instance=ExtResource( 2 )] unique_name_in_owner = true -position = Vector2( -70, -1.90735e-06 ) +position = Vector2( 273, -24 ) scale = Vector2( 0.878906, 0.936025 ) [node name="AnimationTree" parent="Blobby/BlobbySprite" index="0"] @@ -43,55 +33,6 @@ parameters/playback = SubResource( 4 ) [node name="StateLabel" parent="Blobby" index="6"] visible = false -[node name="Decor" type="Node2D" parent="."] - -[node name="ShaderGrass" parent="Decor" instance=ExtResource( 13 )] -position = Vector2( 118, -35 ) - -[node name="ShaderGrass3" parent="Decor" instance=ExtResource( 13 )] -position = Vector2( 129, -35 ) - -[node name="ShaderGrass2" parent="Decor" instance=ExtResource( 13 )] -position = Vector2( 124, -36 ) -z_index = -1 - -[node name="ShaderGrass4" parent="Decor" instance=ExtResource( 13 )] -position = Vector2( 325, -11 ) - -[node name="ShaderGrass5" parent="Decor" instance=ExtResource( 13 )] -position = Vector2( 339, -11 ) - -[node name="ShaderGrass6" parent="Decor" instance=ExtResource( 13 )] -position = Vector2( 332, -12 ) -z_index = -1 - -[node name="Collectibles" type="Node2D" parent="."] -z_index = -1 - -[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( 336, -7 ) -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 ) cell_size = Vector2( 24, 24 ) @@ -100,62 +41,47 @@ cell_custom_transform = Transform2D( 24, 0, 0, 24, 0, 0 ) collision_layer = 8 collision_mask = 8 format = 1 -tile_data = PoolIntArray( -851975, 3, 0, -851974, 3, 0, -851973, 3, 0, -851972, 3, 0, -851971, 3, 0, -851970, 3, 0, -851969, 3, 0, -917504, 3, 0, -917503, 3, 0, -917502, 3, 0, -917501, 3, 0, -917500, 3, 0, -917499, 3, 0, -917498, 3, 0, -917497, 3, 0, -917496, 3, 0, -917495, 3, 0, -917494, 3, 0, -917493, 3, 0, -917492, 3, 0, -917491, 3, 0, -917490, 3, 0, -917489, 3, 0, -917488, 3, 0, -917487, 3, 0, -917486, 3, 0, -917485, 3, 0, -917484, 3, 0, -917483, 3, 0, -917482, 3, 0, -917481, 3, 0, -917480, 3, 0, -917479, 3, 0, -917478, 3, 0, -917477, 3, 0, -917476, 3, 0, -917475, 3, 0, -917474, 3, 0, -917473, 3, 0, -917472, 3, 0, -917471, 3, 0, -917470, 3, 0, -917469, 3, 0, -917468, 3, 0, -917467, 3, 0, -917466, 3, 0, -917465, 3, 0, -917464, 3, 0, -917463, 3, 0, -917462, 3, 0, -917461, 3, 0, -917460, 3, 0, -917459, 3, 0, -917458, 3, 0, -917457, 3, 0, -917456, 3, 0, -917455, 3, 0, -917454, 3, 0, -917453, 3, 0, -917452, 3, 0, -917451, 3, 0, -917450, 3, 0, -917449, 3, 0, -917448, 3, 0, -917447, 3, 0, -917446, 3, 0, -917445, 3, 0, -917444, 3, 0, -917443, 3, 0, -917442, 3, 0, -786439, 3, 0, -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, 3, 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, -851906, 3, 0, -720903, 3, 0, -720902, -1610612734, 0, -786371, -1073741822, 0, -786370, 3, 0, -655367, 3, 0, -655366, -1610612734, 0, -720835, -1073741824, 0, -720834, 3, 0, -589831, 3, 0, -589830, -1610612736, 0, -655299, -1073741822, 0, -655298, 3, 0, -524295, 3, 0, -524294, -1610612734, 0, -589763, -1073741822, 0, -589762, 3, 0, -458759, 3, 0, -458758, -1610612734, 0, -524227, -1073741824, 0, -524226, 3, 0, -393223, 3, 0, -393222, -1610612736, 0, -458691, -1073741822, 0, -458690, 3, 0, -327687, 3, 0, -327686, -1610612734, 0, -393155, -1073741822, 0, -393154, 3, 0, -262151, 3, 0, -262150, -1610612734, 0, -327619, -1073741824, 0, -327618, 3, 0, -196615, 3, 0, -196614, -1610612736, 0, -262088, 0, 0, -262087, 2, 0, -262086, 2, 0, -262085, 0, 0, -262084, 2, 0, -262083, 1610612739, 0, -262082, 3, 0, -131079, 3, 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, 3, 0, -196546, 3, 0, -65543, 3, 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, -131034, 2, 0, -131033, 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, 3, 0, -131010, 3, 0, -7, 3, 0, -6, -1610612736, 0, -65532, 2, 0, -65531, 0, 0, -65530, 2, 0, -65529, 4, 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, 4, 0, -65513, 0, 0, -65500, 2, 0, -65499, 0, 0, -65498, 3, 0, -65497, 3, 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, 3, 0, -65474, 3, 0, 65529, 3, 0, 65530, 3, 0, 65531, 4, 0, 65532, 0, 0, 65533, 2, 0, 65534, 2, 0, 65535, 0, 0, 0, 2, 0, 1, 2, 0, 2, 0, 0, 3, 4, 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, 3, 0, 24, 3, 0, 25, 3, 0, 26, 0, 0, 27, 2, 0, 30, 2, 0, 31, 0, 0, 32, 2, 0, 33, 2, 0, 34, 0, 0, 35, 2, 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, 62, 3, 0, 131065, 3, 0, 131066, 3, 0, 131067, 3, 0, 131068, 3, 0, 131069, 3, 0, 131070, 3, 0, 131071, 3, 0, 65536, 3, 0, 65537, 3, 0, 65538, 3, 0, 65539, 3, 0, 65540, 3, 0, 65541, 3, 0, 65542, 3, 0, 65543, 3, 0, 65544, 3, 0, 65545, 3, 0, 65546, 3, 0, 65547, 3, 0, 65548, 3, 0, 65549, 3, 0, 65550, 3, 0, 65551, 3, 0, 65552, 3, 0, 65553, 3, 0, 65554, 3, 0, 65555, 3, 0, 65556, 3, 0, 65557, 3, 0, 65558, 3, 0, 65559, 3, 0, 65560, 3, 0, 65561, 3, 0, 65562, 3, 0, 65563, 3, 0, 65564, 3, 0, 65565, 3, 0, 65566, 3, 0, 65567, 3, 0, 65568, 3, 0, 65569, 3, 0, 65570, 3, 0, 65571, 3, 0, 65572, 3, 0, 65573, 3, 0, 65574, 3, 0, 65575, 3, 0, 65576, 3, 0, 65577, 3, 0, 65578, 3, 0, 65579, 3, 0, 65580, 3, 0, 65581, 3, 0, 65582, 3, 0, 65583, 3, 0, 65584, 3, 0, 65585, 3, 0, 65586, 3, 0, 65587, 3, 0, 65588, 3, 0, 65589, 3, 0, 65590, 3, 0, 65591, 3, 0, 65592, 3, 0, 65593, 3, 0, 65594, 3, 0, 65595, 3, 0, 65596, 3, 0, 65597, 3, 0, 65598, 3, 0 ) +tile_data = PoolIntArray( -1900545, -1610612733, 0, -1966080, 1610612738, 0, -1966079, 1610612738, 0, -1966078, 1610612738, 0, -1966077, 1610612738, 0, -1966076, 1610612738, 0, -1966075, 1610612738, 0, -1966074, 1610612738, 0, -1966073, 1610612738, 0, -1966072, 1610612738, 0, -1966071, 1610612738, 0, -1966070, 1610612738, 0, -1966069, 1610612738, 0, -1966068, 1610612738, 0, -1966067, 1610612738, 0, -1966066, 1610612738, 0, -1966065, 1610612738, 0, -1966064, 1610612738, 0, -1966063, 1610612738, 0, -1966062, 1610612738, 0, -1966061, 1610612738, 0, -1966060, 1610612738, 0, -1966059, 1610612738, 0, -1966058, 1610612738, 0, -1966057, 1610612738, 0, -1966056, 1610612738, 0, -1966055, 1610612738, 0, -1966054, 1610612738, 0, -1966053, 1610612739, 0, -1835009, -1610612734, 0, -1900517, -1073741822, 0, -1769473, -1610612734, 0, -1834981, -1073741822, 0, -1703937, -1610612734, 0, -1769445, -1073741822, 0, -1638401, -1610612734, 0, -1703909, -1073741822, 0, -1572865, -1610612734, 0, -1638373, -1073741822, 0, -1507329, -1610612734, 0, -1572837, -1073741822, 0, -1441793, -1610612734, 0, -1507301, -1073741822, 0, -1376257, -1610612734, 0, -1441765, -1073741822, 0, -1310721, -1610612734, 0, -1376229, -1073741822, 0, -1245185, -1610612734, 0, -1310693, -1073741822, 0, -1179649, -1610612734, 0, -1245157, -1073741822, 0, -1114113, -1610612734, 0, -1179621, -1073741822, 0, -1048577, -1610612734, 0, -1114085, -1073741822, 0, -983041, -1610612734, 0, -1048549, -1073741822, 0, -917505, -1610612734, 0, -983013, -1073741822, 0, -851969, -1610612734, 0, -917477, -1073741822, 0, -786433, -1610612734, 0, -851941, -1073741822, 0, -720897, -1610612734, 0, -786405, -1073741822, 0, -655361, -1610612734, 0, -720869, -1073741822, 0, -589825, -1610612734, 0, -655333, -1073741822, 0, -524289, -1610612734, 0, -589797, -1073741822, 0, -458753, -1610612734, 0, -524261, -1073741822, 0, -393217, -1610612734, 0, -458725, -1073741822, 0, -327681, -1610612734, 0, -393189, -1073741822, 0, -262145, -1610612734, 0, -327653, -1073741822, 0, -196609, -1610612734, 0, -262117, -1073741822, 0, -131073, -1610612734, 0, -196581, -1073741822, 0, -65537, -1610612734, 0, -131045, -1073741822, 0, -1, -1610612733, 0, -65536, 2, 0, -65535, 2, 0, -65534, 2, 0, -65533, 2, 0, -65532, 2, 0, -65531, 2, 0, -65530, 2, 0, -65529, 2, 0, -65528, 2, 0, -65527, 2, 0, -65526, 2, 0, -65525, 2, 0, -65524, 2, 0, -65523, 2, 0, -65522, 2, 0, -65521, 2, 0, -65520, 2, 0, -65519, 2, 0, -65518, 2, 0, -65517, 2, 0, -65516, 2, 0, -65515, 2, 0, -65514, 2, 0, -65513, 2, 0, -65512, 2, 0, -65511, 2, 0, -65510, 2, 0, -65509, 3, 0 ) -[node name="Spikes" parent="TileMap" instance=ExtResource( 3 )] -position = Vector2( 708, 12 ) -rotation = 1.57079 +[node name="DropThroughPlatform" parent="." instance=ExtResource( 3 )] +position = Vector2( 273, -24 ) +scale = Vector2( 0.878906, 0.936025 ) +tile_data = PoolIntArray( -262170, 1, 0, -262169, 0, 0, -262167, 0, 0, -262165, 0, 0, -262163, 0, 0, -262161, 0, 0, -262159, 0, 0, -262157, 0, 0, -262155, 0, 0, -262153, 0, 0, -262151, 0, 0, -262149, 0, 0, -262147, 0, 0, -262145, 0, 0, -327679, 0, 0, -327677, 0, 0, -327675, 0, 0, -327673, 0, 0, -327671, 0, 0, -327670, 0, 0, -327668, 0, 0, -327666, 0, 0, -327664, 0, 0, -327662, 0, 0, -327660, 0, 0, -327658, 0, 0, -327656, 0, 0, -327654, 0, 0, -327652, 0, 0, -327650, 0, 0, -327648, 0, 0, -327646, 2, 0 ) -[node name="Spikes2" parent="TileMap" instance=ExtResource( 3 )] -position = Vector2( 1140, -36 ) -rotation = 1.57079 +[node name="DropThroughPlatform2" parent="." instance=ExtResource( 3 )] +position = Vector2( 273, -81 ) +scale = Vector2( 0.878906, 0.936025 ) +tile_data = PoolIntArray( -262170, 1, 0, -262169, 0, 0, -262167, 0, 0, -262165, 0, 0, -262163, 0, 0, -262161, 0, 0, -262159, 0, 0, -262157, 0, 0, -262155, 0, 0, -262153, 0, 0, -262151, 0, 0, -262149, 0, 0, -262147, 0, 0, -262145, 0, 0, -327679, 0, 0, -327677, 0, 0, -327675, 0, 0, -327673, 0, 0, -327671, 0, 0, -327670, 0, 0, -327668, 0, 0, -327666, 0, 0, -327664, 0, 0, -327662, 0, 0, -327660, 0, 0, -327658, 0, 0, -327656, 0, 0, -327654, 0, 0, -327652, 0, 0, -327650, 0, 0, -327648, 0, 0, -327646, 2, 0 ) -[node name="Spikes4" parent="TileMap" instance=ExtResource( 3 )] -position = Vector2( 1164, -36 ) -rotation = 1.57079 +[node name="DropThroughPlatform3" parent="." instance=ExtResource( 3 )] +position = Vector2( 274.5, -135.142 ) +scale = Vector2( 0.878906, 0.936025 ) +tile_data = PoolIntArray( -262170, 1, 0, -262169, 0, 0, -262167, 0, 0, -262165, 0, 0, -262163, 0, 0, -262161, 0, 0, -262159, 0, 0, -262157, 0, 0, -262155, 0, 0, -262153, 0, 0, -262151, 0, 0, -262149, 0, 0, -262147, 0, 0, -262145, 0, 0, -327679, 0, 0, -327677, 0, 0, -327675, 0, 0, -327673, 0, 0, -327671, 0, 0, -327670, 0, 0, -327668, 0, 0, -327666, 0, 0, -327664, 0, 0, -327662, 0, 0, -327660, 0, 0, -327658, 0, 0, -327656, 0, 0, -327654, 0, 0, -327652, 0, 0, -327650, 0, 0, -327648, 0, 0, -327646, 2, 0 ) -[node name="Spikes5" parent="TileMap" instance=ExtResource( 3 )] -position = Vector2( 1188, -36 ) -rotation = 1.57079 +[node name="DropThroughPlatform4" parent="." instance=ExtResource( 3 )] +position = Vector2( 274.5, -192.142 ) +scale = Vector2( 0.878906, 0.936025 ) +tile_data = PoolIntArray( -262170, 1, 0, -262169, 0, 0, -262167, 0, 0, -262165, 0, 0, -262163, 0, 0, -262161, 0, 0, -262159, 0, 0, -262157, 0, 0, -262155, 0, 0, -262153, 0, 0, -262151, 0, 0, -262149, 0, 0, -262147, 0, 0, -262145, 0, 0, -327679, 0, 0, -327677, 0, 0, -327675, 0, 0, -327673, 0, 0, -327671, 0, 0, -327670, 0, 0, -327668, 0, 0, -327666, 0, 0, -327664, 0, 0, -327662, 0, 0, -327660, 0, 0, -327658, 0, 0, -327656, 0, 0, -327654, 0, 0, -327652, 0, 0, -327650, 0, 0, -327648, 0, 0, -327646, 2, 0 ) -[node name="Spikes6" parent="TileMap" instance=ExtResource( 3 )] -position = Vector2( 1212, -36 ) -rotation = 1.57079 +[node name="DropThroughPlatform5" parent="." instance=ExtResource( 3 )] +position = Vector2( 271.5, -240 ) +scale = Vector2( 0.878906, 0.936025 ) +tile_data = PoolIntArray( -262170, 1, 0, -262169, 0, 0, -262167, 0, 0, -262165, 0, 0, -262163, 0, 0, -262161, 0, 0, -262159, 0, 0, -262157, 0, 0, -262155, 0, 0, -262153, 0, 0, -262151, 0, 0, -262149, 0, 0, -262147, 0, 0, -262145, 0, 0, -327679, 0, 0, -327677, 0, 0, -327675, 0, 0, -327673, 0, 0, -327671, 0, 0, -327670, 0, 0, -327668, 0, 0, -327666, 0, 0, -327664, 0, 0, -327662, 0, 0, -327660, 0, 0, -327658, 0, 0, -327656, 0, 0, -327654, 0, 0, -327652, 0, 0, -327650, 0, 0, -327648, 0, 0, -327646, 2, 0 ) -[node name="Spikes7" parent="TileMap" instance=ExtResource( 3 )] -position = Vector2( 1236, -36 ) -rotation = 1.57079 +[node name="DropThroughPlatform6" parent="." instance=ExtResource( 3 )] +position = Vector2( 271.5, -297 ) +scale = Vector2( 0.878906, 0.936025 ) +tile_data = PoolIntArray( -262170, 1, 0, -262169, 0, 0, -262167, 0, 0, -262165, 0, 0, -262163, 0, 0, -262161, 0, 0, -262159, 0, 0, -262157, 0, 0, -262155, 0, 0, -262153, 0, 0, -262151, 0, 0, -262149, 0, 0, -262147, 0, 0, -262145, 0, 0, -327679, 0, 0, -327677, 0, 0, -327675, 0, 0, -327673, 0, 0, -327671, 0, 0, -327670, 0, 0, -327668, 0, 0, -327666, 0, 0, -327664, 0, 0, -327662, 0, 0, -327660, 0, 0, -327658, 0, 0, -327656, 0, 0, -327654, 0, 0, -327652, 0, 0, -327650, 0, 0, -327648, 0, 0, -327646, 2, 0 ) -[node name="Spikes3" parent="TileMap" instance=ExtResource( 3 )] -position = Vector2( 684, 12 ) -rotation = 1.57079 +[node name="DropThroughPlatform7" parent="." instance=ExtResource( 3 )] +position = Vector2( 273, -351.142 ) +scale = Vector2( 0.878906, 0.936025 ) +tile_data = PoolIntArray( -262170, 1, 0, -262169, 0, 0, -262167, 0, 0, -262165, 0, 0, -262163, 0, 0, -262161, 0, 0, -262159, 0, 0, -262157, 0, 0, -262155, 0, 0, -262153, 0, 0, -262151, 0, 0, -262149, 0, 0, -262147, 0, 0, -262145, 0, 0, -327679, 0, 0, -327677, 0, 0, -327675, 0, 0, -327673, 0, 0, -327671, 0, 0, -327670, 0, 0, -327668, 0, 0, -327666, 0, 0, -327664, 0, 0, -327662, 0, 0, -327660, 0, 0, -327658, 0, 0, -327656, 0, 0, -327654, 0, 0, -327652, 0, 0, -327650, 0, 0, -327648, 0, 0, -327646, 2, 0 ) -[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="ButtonBody" parent="TreeWhyButtons/WhyButton2" index="5"] -collision_layer = 16 - -[node name="WhyButton3" parent="TreeWhyButtons" index="2"] -position = Vector2( 1452, -77 ) -rotation = -1.5708 - -[node name="ElevatorButton" parent="." instance=ExtResource( 4 )] -position = Vector2( 1452, -96 ) - -[node name="Portal" parent="ElevatorButton" instance=ExtResource( 5 )] -visible = false -position = Vector2( -1464, 84 ) -monitoring = false -next_scene = ExtResource( 9 ) +[node name="DropThroughPlatform8" parent="." instance=ExtResource( 3 )] +position = Vector2( 273, -408.142 ) +scale = Vector2( 0.878906, 0.936025 ) +tile_data = PoolIntArray( -262170, 1, 0, -262169, 0, 0, -262167, 0, 0, -262165, 0, 0, -262163, 0, 0, -262161, 0, 0, -262159, 0, 0, -262157, 0, 0, -262155, 0, 0, -262153, 0, 0, -262151, 0, 0, -262149, 0, 0, -262147, 0, 0, -262145, 0, 0, -327679, 0, 0, -327677, 0, 0, -327675, 0, 0, -327673, 0, 0, -327671, 0, 0, -327670, 0, 0, -327668, 0, 0, -327666, 0, 0, -327664, 0, 0, -327662, 0, 0, -327660, 0, 0, -327658, 0, 0, -327656, 0, 0, -327654, 0, 0, -327652, 0, 0, -327650, 0, 0, -327648, 0, 0, -327646, 2, 0 ) [node name="GameplaySignalManager" type="Node2D" parent="."] script = ExtResource( 10 ) @@ -169,7 +95,3 @@ script = ExtResource( 10 ) [editable path="UserInterface/HUD"] [editable path="BlobbyCam"] [editable path="Blobby"] -[editable path="TreeWhyButtons"] -[editable path="TreeWhyButtons/WhyButton1"] -[editable path="TreeWhyButtons/WhyButton2"] -[editable path="TreeWhyButtons/WhyButton3"] diff --git a/src/Levels/Enemy Test Level.tscn b/src/Levels/Enemy Test Level.tscn index 14e21e7..c3aca62 100644 --- a/src/Levels/Enemy Test Level.tscn +++ b/src/Levels/Enemy Test Level.tscn @@ -4,7 +4,7 @@ [ext_resource path="res://assets/environment/blocks/24BlockBasic.png" type="Texture" id=2] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=3] [ext_resource path="res://src/ObstacleObjects/Spikes.tscn" type="PackedScene" id=4] -[ext_resource path="res://src/Actors/Enemies/Beings/Enemy.tscn" type="PackedScene" id=5] +[ext_resource path="res://src/Actors/Enemies/Beings/Caterpillar.tscn" type="PackedScene" id=5] [ext_resource path="res://src/Actors/Enemies/Beings/SimpleEnemy.tscn" type="PackedScene" id=6] [ext_resource path="res://src/Actors/Enemies/Beings/SmortEnemy.tscn" type="PackedScene" id=7] [ext_resource path="res://src/Actors/Enemies/Beings/DartingEnemy.tscn" type="PackedScene" id=8] @@ -53,8 +53,8 @@ position = Vector2( -259.915, 710.547 ) [node name="SmortEnemy" parent="." instance=ExtResource( 7 )] position = Vector2( 220, 804 ) -[node name="Enemy" parent="." instance=ExtResource( 5 )] -position = Vector2( 0, 780 ) +[node name="Caterpillar" parent="." instance=ExtResource( 5 )] +position = Vector2( -41, 782 ) [node name="Enemy2" parent="." instance=ExtResource( 6 )] position = Vector2( 492, 804 )