Health and killing zones

This commit is contained in:
2024-10-28 10:25:07 +01:00
parent e242f59c0b
commit a15966a361
9 changed files with 42 additions and 47 deletions

View File

@ -1,10 +1,9 @@
[gd_scene load_steps=12 format=3 uid="uid://cxni03aowykty"]
[gd_scene load_steps=11 format=3 uid="uid://cxni03aowykty"]
[ext_resource type="PackedScene" uid="uid://cwhk7ysxws0s0" path="res://scenes/Game/Player/player.tscn" id="1_ol65m"]
[ext_resource type="Texture2D" uid="uid://cyn664h8v4yjq" path="res://assets/Sunny Land Collection Files/Sunny Land Collection Files/Assets/Environments/Day-Platformer/PNG/tileset.png" id="2_2shen"]
[ext_resource type="PackedScene" uid="uid://5bcs7peqaotp" path="res://scenes/Game/Background/parallax_background.tscn" id="2_7th7e"]
[ext_resource type="Script" path="res://scenes/Game/Background/static_body_2d.gd" id="4_4hn3y"]
[ext_resource type="Script" path="res://scenes/Game/floor.gd" id="5_ehkb0"]
[ext_resource type="Script" path="res://scenes/Game/killinzone.gd" id="4_rly4c"]
[ext_resource type="PackedScene" uid="uid://cwwrv2mwnu2q3" path="res://scenes/Game/Enemy/enemy.tscn" id="6_0idbk"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_650cm"]
@ -150,7 +149,6 @@ layer_0/tile_data = PackedInt32Array(1507360, 196608, 4, 1507361, 196608, 4, 150
position = Vector2(131, 104)
[node name="StaticBody2D" type="StaticBody2D" parent="."]
script = ExtResource("4_4hn3y")
[node name="roof" type="CollisionShape2D" parent="StaticBody2D"]
position = Vector2(575, -9)
@ -166,13 +164,17 @@ position = Vector2(-9, 322.5)
rotation = 1.5708
shape = SubResource("RectangleShape2D_5wtle")
[node name="floor" type="CollisionShape2D" parent="StaticBody2D"]
unique_name_in_owner = true
[node name="Area2D" type="Area2D" parent="StaticBody2D"]
position = Vector2(602, 751)
script = ExtResource("4_rly4c")
[node name="floor" type="CollisionShape2D" parent="StaticBody2D/Area2D"]
shape = SubResource("RectangleShape2D_igtsr")
script = ExtResource("5_ehkb0")
[node name="mobs" type="Node" parent="."]
[node name="enemy" parent="mobs" instance=ExtResource("6_0idbk")]
position = Vector2(439, 456)
[connection signal="body_entered" from="StaticBody2D/Area2D" to="StaticBody2D/Area2D" method="_on_body_entered"]
[connection signal="hurt" from="mobs/enemy" to="Player" method="_on_enemy_hurt"]