Fixed enemy movement
This commit is contained in:
1 parent
84d09120b2
commit
e325412c84
6 files changed
+63
-25
No files matched your search
+2
-4
@@ -1,10 +1,10 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cyy6jr7mxu0jl"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cb874g2gkrukb" path="res://scripts/bullet.gd" id="1_mkf8s"]
|
||||
[ext_resource type="Texture2D" uid="uid://rejfd2gqjk7w" path="res://assets/graphics/effects/14.png" id="2_y25gk"]
|
||||
[ext_resource type="Texture2D" uid="uid://bwubigf4fgyo8" path="res://assets/graphics/effects/02.png" id="2_y25gk"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_h1aey"]
|
||||
size = Vector2(16, 20)
|
||||
size = Vector2(4, 2)
|
||||
|
||||
[node name="Bullet" type="Area2D"]
|
||||
z_index = 100
|
||||
@@ -13,9 +13,7 @@ collision_mask = 22
|
||||
script = ExtResource("1_mkf8s")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(-1, 0)
|
||||
shape = SubResource("RectangleShape2D_h1aey")
|
||||
debug_color = Color(1, 0, 0, 1)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
scale = Vector2(0.1, 0.1)
|
||||
|
||||
+9
-10
@@ -46,6 +46,7 @@ size = Vector2(14, 15)
|
||||
collision_layer = 16
|
||||
collision_mask = 15
|
||||
script = ExtResource("1_4oill")
|
||||
speed = 100
|
||||
|
||||
[node name="SlimeSprite" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_negjt")
|
||||
@@ -58,23 +59,21 @@ position = Vector2(0, 4.5)
|
||||
shape = SubResource("RectangleShape2D_02r3y")
|
||||
|
||||
[node name="RightCast" type="RayCast2D" parent="."]
|
||||
position = Vector2(1, 0)
|
||||
target_position = Vector2(20, 0)
|
||||
collision_mask = 3
|
||||
target_position = Vector2(7, 0)
|
||||
collision_mask = 2
|
||||
|
||||
[node name="LeftCast" type="RayCast2D" parent="."]
|
||||
position = Vector2(1, 0)
|
||||
target_position = Vector2(-20, 0)
|
||||
collision_mask = 3
|
||||
target_position = Vector2(-7, 0)
|
||||
collision_mask = 2
|
||||
|
||||
[node name="RightDownCast" type="RayCast2D" parent="."]
|
||||
position = Vector2(8, 0)
|
||||
position = Vector2(7, 0)
|
||||
target_position = Vector2(0, 20)
|
||||
collision_mask = 3
|
||||
collision_mask = 2
|
||||
|
||||
[node name="LeftDownCast" type="RayCast2D" parent="."]
|
||||
position = Vector2(-6, 0)
|
||||
position = Vector2(-7, 0)
|
||||
target_position = Vector2(0, 20)
|
||||
collision_mask = 3
|
||||
collision_mask = 2
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
Reference in new issue
Block a user