Got most basic enemy movement working

This commit is contained in:
=
2026-01-27 08:26:35 -07:00
parent 318397ee29
commit 0506824cf1
3 changed files with 50 additions and 48 deletions

View File

@@ -3,8 +3,6 @@
[ext_resource type="Script" uid="uid://cy22d14qd0f48" path="res://Assets/Scenes/DEVSCENES/IQEnemy.cs" id="1_p53ib"]
[ext_resource type="Texture2D" uid="uid://c0pno0ac25r7i" path="res://Assets/Sprites/knight.png" id="2_o0b1e"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_bc7hl"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_41iyt"]
[sub_resource type="AtlasTexture" id="AtlasTexture_a1e3t"]
@@ -127,6 +125,8 @@ animations = [{
"speed": 5.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_bc7hl"]
[node name="IQEnemy" type="CharacterBody2D"]
collision_layer = 8
collision_mask = 3
@@ -134,38 +134,40 @@ script = ExtResource("1_p53ib")
metadata/IQ = 20
metadata/AbilityRegenerate = true
[node name="GroundDetector" type="Area2D" parent="."]
position = Vector2(1.1368684e-13, 10.999999)
scale = Vector2(0.099999994, 0.099999994)
collision_layer = 0
[node name="CollisionShape2D" type="CollisionShape2D" parent="GroundDetector"]
scale = Vector2(0.99999994, 0.99999994)
shape = SubResource("RectangleShape2D_bc7hl")
[node name="LedgeDetector" type="Area2D" parent="."]
collision_layer = 0
[node name="CollisionShape2D" type="CollisionShape2D" parent="LedgeDetector"]
position = Vector2(14, 14)
scale = Vector2(0.1, 0.1)
shape = SubResource("RectangleShape2D_bc7hl")
[node name="WallDetector" type="Area2D" parent="."]
collision_layer = 0
[node name="CollisionShape2D" type="CollisionShape2D" parent="WallDetector"]
position = Vector2(14, 9.536743e-07)
scale = Vector2(0.1, 0.1)
shape = SubResource("RectangleShape2D_bc7hl")
[node name="Hitbox" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_41iyt")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
[node name="VisualsAndHitboxes" type="Node2D" parent="."]
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="VisualsAndHitboxes"]
position = Vector2(9.536743e-07, -1.9999999)
scale = Vector2(0.99999994, 0.99999994)
sprite_frames = SubResource("SpriteFrames_rqn21")
autoplay = "default"
frame = 1
frame_progress = 0.9866207
[node name="GroundDetector" type="Area2D" parent="VisualsAndHitboxes"]
position = Vector2(1.1368684e-13, 10.999999)
scale = Vector2(0.099999994, 0.099999994)
collision_layer = 0
[node name="CollisionShape2D" type="CollisionShape2D" parent="VisualsAndHitboxes/GroundDetector"]
scale = Vector2(0.99999994, 0.99999994)
shape = SubResource("RectangleShape2D_bc7hl")
[node name="LedgeDetector" type="Area2D" parent="VisualsAndHitboxes"]
collision_layer = 0
[node name="CollisionShape2D" type="CollisionShape2D" parent="VisualsAndHitboxes/LedgeDetector"]
position = Vector2(14, 14)
scale = Vector2(0.1, 0.1)
shape = SubResource("RectangleShape2D_bc7hl")
[node name="WallDetector" type="Area2D" parent="VisualsAndHitboxes"]
collision_layer = 0
[node name="CollisionShape2D" type="CollisionShape2D" parent="VisualsAndHitboxes/WallDetector"]
position = Vector2(14, 9.536743e-07)
scale = Vector2(0.1, 0.1)
shape = SubResource("RectangleShape2D_bc7hl")