From 423718bebef0f0d6897ac48bb365760b520fb96f Mon Sep 17 00:00:00 2001 From: Victor Turgeon Date: Sun, 15 Jan 2023 15:02:42 -0500 Subject: [PATCH] fnkdolpojso grmhbhigjshkdfnkgtah --- Enemies/urinal_mimic.gd | 3 + Enemies/urinal_mimic.tscn | 2 +- Levels/level.gd | 32 +++++++- Levels/level.tscn | 117 ++++++++++++++++++++++++++++-- PickableItems/basic_item.gd | 1 + PickableItems/pickable_pants.tscn | 12 +++ Projectiles/feather.tscn | 31 ++++++++ Sprites/Feather_5.png | Bin 0 -> 561 bytes Sprites/Feather_5.png.import | 34 +++++++++ Sprites/Pants.png | Bin 0 -> 791 bytes Sprites/Pants.png.import | 34 +++++++++ Sprites/Pillow.png | Bin 0 -> 1440 bytes Sprites/Pillow.png.import | 34 +++++++++ Weapons/pillow.tscn | 18 +++++ 14 files changed, 308 insertions(+), 10 deletions(-) create mode 100644 PickableItems/pickable_pants.tscn create mode 100644 Projectiles/feather.tscn create mode 100644 Sprites/Feather_5.png create mode 100644 Sprites/Feather_5.png.import create mode 100644 Sprites/Pants.png create mode 100644 Sprites/Pants.png.import create mode 100644 Sprites/Pillow.png create mode 100644 Sprites/Pillow.png.import create mode 100644 Weapons/pillow.tscn diff --git a/Enemies/urinal_mimic.gd b/Enemies/urinal_mimic.gd index 5432758..93e6e05 100644 --- a/Enemies/urinal_mimic.gd +++ b/Enemies/urinal_mimic.gd @@ -43,6 +43,7 @@ func take_damage(damage): kill(); func kill(): + emit_signal("is_killed"); queue_free(); func set_player(p): @@ -57,3 +58,5 @@ func _on_area_2d_body_entered(body): func _on_animated_sprite_2d_animation_finished(): attacking = true; + +signal is_killed() diff --git a/Enemies/urinal_mimic.tscn b/Enemies/urinal_mimic.tscn index d2f06a0..ee00830 100644 --- a/Enemies/urinal_mimic.tscn +++ b/Enemies/urinal_mimic.tscn @@ -68,7 +68,7 @@ animations = [{ size = Vector2(23, 21) [sub_resource type="CircleShape2D" id="CircleShape2D_0y76e"] -radius = 120.037 +radius = 216.0 [node name="urinal_mimic" type="CharacterBody2D"] script = ExtResource("1_2ga4k") diff --git a/Levels/level.gd b/Levels/level.gd index ce75911..d1b0322 100644 --- a/Levels/level.gd +++ b/Levels/level.gd @@ -2,11 +2,15 @@ extends Node2D @onready var doors = $Doors; +var mimic_count = 0; + func _ready(): pass func _process(delta): - pass + if mimic_count >= 4 : + doors.remove_child($Doors/Bathroom_Bottom); + doors.remove_child($Doors/Cafeteria); func _on_pickable_t_shirt_picked(): doors.remove_child($Doors/FrontDoor_Left); @@ -19,3 +23,29 @@ func _on_outside_enemy_is_killed(): func _on_shoes_picked(): doors.remove_child($Doors/Bathroom_Top); + + +func _on_mimic_01_is_killed(): + mimic_count += 1; + + +func _on_mimic_03_is_killed(): + mimic_count += 1; + + +func _on_mimic_04_is_killed(): + mimic_count += 1; + + +func _on_mimic_02_is_killed(): + mimic_count += 1; + +func _on_pants_picked(): + doors.remove_child($Doors/Locker); + + +func _on_gym_enemy_05_is_killed(): + doors.remove_child($Doors/Gym); + doors.remove_child($Doors/BackDoor_Left); + doors.remove_child($Doors/BackDoor_Right); + diff --git a/Levels/level.tscn b/Levels/level.tscn index 7ffe2dd..c3f1e7f 100644 --- a/Levels/level.tscn +++ b/Levels/level.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=11 format=3 uid="uid://b8rvp5g0vj8q1"] +[gd_scene load_steps=13 format=3 uid="uid://b8rvp5g0vj8q1"] [ext_resource type="TileSet" uid="uid://bi3tupdxmgcim" path="res://TileSets/tiles.tres" id="1_8igly"] [ext_resource type="Script" path="res://Levels/level.gd" id="1_x3isi"] @@ -8,6 +8,8 @@ [ext_resource type="PackedScene" uid="uid://bbg5x0apue0ei" path="res://PickableItems/pickable_t_shirt.tscn" id="5_kahe8"] [ext_resource type="PackedScene" uid="uid://c661br4lh30r8" path="res://Enemies/basic_enemy.tscn" id="7_qt4sv"] [ext_resource type="PackedScene" uid="uid://degce2jvx3sli" path="res://PickableItems/pickable_shoes.tscn" id="8_qnb3g"] +[ext_resource type="PackedScene" uid="uid://2wpk5ocpyhbm" path="res://PickableItems/pickable_pants.tscn" id="9_8e12f"] +[ext_resource type="PackedScene" uid="uid://p7aa6t787b3d" path="res://Enemies/urinal_mimic.tscn" id="10_8g8ng"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_8jn25"] size = Vector2(85, 5534.75) @@ -77,6 +79,11 @@ shape = SubResource("RectangleShape2D_5xvim") position = Vector2(2906, 758) scale = Vector2(4.47547, 4.07547) +[node name="MiddleDoor" parent="Doors" instance=ExtResource("4_oukel")] +position = Vector2(3067, 1724) +rotation = 0.163856 +scale = Vector2(10.6234, 9.67391) + [node name="FrontDoor_Right" parent="Doors" instance=ExtResource("4_oukel")] position = Vector2(3239, 762) rotation = -3.14159 @@ -121,10 +128,6 @@ position = Vector2(3239, 4090) rotation = -3.14159 scale = Vector2(4.47547, 4.07547) -[node name="pickable_t_shirt" parent="." instance=ExtResource("5_kahe8")] -position = Vector2(3586, 650) -rotation = 0.286545 - [node name="Outside_Enemy" parent="." instance=ExtResource("7_qt4sv")] position = Vector2(3939, 657) @@ -137,9 +140,107 @@ position = Vector2(2310, 1138) [node name="Class_Enemy03" parent="." instance=ExtResource("7_qt4sv")] position = Vector2(2367, 1350) -[node name="shoes" parent="." instance=ExtResource("8_qnb3g")] -position = Vector2(2595, 969) +[node name="pickable_t_shirt" parent="." instance=ExtResource("5_kahe8")] +position = Vector2(3592, 679) + +[node name="shoes" parent="." instance=ExtResource("8_qnb3g")] +position = Vector2(2606, 954) + +[node name="Mimic_01" parent="." instance=ExtResource("10_8g8ng")] +position = Vector2(3686, 1379) + +[node name="Mimic_03" parent="." instance=ExtResource("10_8g8ng")] +position = Vector2(3753, 2076) +rotation = 3.14159 + +[node name="Mimic_04" parent="." instance=ExtResource("10_8g8ng")] +position = Vector2(3688, 2076) +rotation = 3.14159 + +[node name="Mimic_02" parent="." instance=ExtResource("10_8g8ng")] +position = Vector2(3750, 1379) + +[node name="pants" parent="." instance=ExtResource("9_8e12f")] +position = Vector2(2267, 2783) + +[node name="Gym_Enemy01" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(4028, 3202) + +[node name="Gym_Enemy02" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(3885, 3027) + +[node name="Gym_Enemy03" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(3783, 3449) + +[node name="Gym_Enemy04" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(3824, 3176) + +[node name="Gym_Enemy05" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(3970, 3468) + +[node name="Cafeteria_Enemye01" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(2194, 2563) + +[node name="Cafeteria_Enemye02" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(2305, 2671) + +[node name="Cafeteria_Enemye03" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(2188, 2790) + +[node name="Cafeteria_Enemye04" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(2386, 2818) + +[node name="Cafeteria_Enemye05" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(2433, 2624) + +[node name="End_Enemy01" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(2771, 4556) + +[node name="End_Enemy02" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(3085, 4534) + +[node name="End_Enemy03" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(3354, 4502) + +[node name="End_Enemy04" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(3614, 4614) + +[node name="End_Enemy05" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(2606, 4735) + +[node name="End_Enemy06" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(3026, 4915) + +[node name="End_Enemy07" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(3340, 4731) + +[node name="End_Enemy08" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(2406, 4753) + +[node name="End_Enemy09" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(2460, 4461) + +[node name="End_Enemy10" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(3021, 4524) + +[node name="End_Enemy11" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(3609, 4539) + +[node name="End_Enemy12" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(4013, 4530) + +[node name="End_Enemy13" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(3658, 4777) + +[node name="End_Enemy14" parent="." instance=ExtResource("7_qt4sv")] +position = Vector2(3658, 4777) -[connection signal="picked" from="pickable_t_shirt" to="." method="_on_pickable_t_shirt_picked"] [connection signal="is_killed" from="Outside_Enemy" to="." method="_on_outside_enemy_is_killed"] +[connection signal="picked" from="pickable_t_shirt" to="." method="_on_pickable_t_shirt_picked"] [connection signal="picked" from="shoes" to="." method="_on_shoes_picked"] +[connection signal="is_killed" from="Mimic_01" to="." method="_on_mimic_01_is_killed"] +[connection signal="is_killed" from="Mimic_03" to="." method="_on_mimic_03_is_killed"] +[connection signal="is_killed" from="Mimic_04" to="." method="_on_mimic_04_is_killed"] +[connection signal="is_killed" from="Mimic_02" to="." method="_on_mimic_02_is_killed"] +[connection signal="picked" from="pants" to="." method="_on_pants_picked"] +[connection signal="is_killed" from="Gym_Enemy05" to="." method="_on_gym_enemy_05_is_killed"] diff --git a/PickableItems/basic_item.gd b/PickableItems/basic_item.gd index 617dfae..0799922 100644 --- a/PickableItems/basic_item.gd +++ b/PickableItems/basic_item.gd @@ -3,6 +3,7 @@ extends Area2D @export var Type : String; @export var Item : PackedScene; + func _on_body_entered(body): if body.name == "Player": pickup_routine(body); diff --git a/PickableItems/pickable_pants.tscn b/PickableItems/pickable_pants.tscn new file mode 100644 index 0000000..d660a05 --- /dev/null +++ b/PickableItems/pickable_pants.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=4 format=3 uid="uid://2wpk5ocpyhbm"] + +[ext_resource type="PackedScene" uid="uid://ci6xls3xseci2" path="res://PickableItems/basic_item.tscn" id="1_pn1kw"] +[ext_resource type="PackedScene" uid="uid://7ui1rkwaycfy" path="res://Weapons/pillow.tscn" id="2_dl4tf"] +[ext_resource type="Texture2D" uid="uid://b38mgf41rovwt" path="res://Sprites/Pants.png" id="3_lkh12"] + +[node name="pants" instance=ExtResource("1_pn1kw")] +Type = "weapon" +Item = ExtResource("2_dl4tf") + +[node name="Sprite2D" parent="." index="1"] +texture = ExtResource("3_lkh12") diff --git a/Projectiles/feather.tscn b/Projectiles/feather.tscn new file mode 100644 index 0000000..0de6af6 --- /dev/null +++ b/Projectiles/feather.tscn @@ -0,0 +1,31 @@ +[gd_scene load_steps=4 format=3 uid="uid://ce4dfmw1o5whm"] + +[ext_resource type="PackedScene" uid="uid://cpo8qy3y0fuui" path="res://Projectiles/basic_projectile.tscn" id="1_5vj07"] +[ext_resource type="Texture2D" uid="uid://lpdurm1dcsee" path="res://Sprites/Feather_5.png" id="2_vv5rv"] + +[sub_resource type="SpriteFrames" id="SpriteFrames_cjo1e"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("2_vv5rv") +}], +"loop": true, +"name": &"explosion", +"speed": 5.0 +}] + +[node name="basic_projectile" instance=ExtResource("1_5vj07")] +DAMAGE = 25 +SPEED = 1000 +LIFETIME = 0.5 +HANG_TIME = 0.2 +FRICTION = 2000.0 + +[node name="Sprite2D" parent="." index="0"] +position = Vector2(4, 41) +rotation = 0.827489 +scale = Vector2(1.26545, 1.26545) +frames = SubResource("SpriteFrames_cjo1e") + +[node name="CollisionShape2D" parent="." index="1"] +position = Vector2(8, 0) diff --git a/Sprites/Feather_5.png b/Sprites/Feather_5.png new file mode 100644 index 0000000000000000000000000000000000000000..590420b9a52d4ee80e5d2a41225e26d8d81b1230 GIT binary patch literal 561 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D%zFM7H-hE&A8 zonh<8Y$(z)*V!fWr2uQJ3YUN=uWY-6$CiKsHYvXYiZ3!&2#8F~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