Optimised enemy code
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
[ext_resource type="Script" uid="uid://cy22d14qd0f48" path="res://Assets/Scenes/DEVSCENES/IQBasedEnemy.cs" id="1_a638n"]
|
||||
[ext_resource type="Texture2D" uid="uid://c0pno0ac25r7i" path="res://Assets/Sprites/knight.png" id="2_xbll0"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_bc7hl"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a1e3t"]
|
||||
atlas = ExtResource("2_xbll0")
|
||||
region = Rect2(0, 64, 32, 32)
|
||||
@@ -125,15 +127,23 @@ animations = [{
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_41iyt"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_bc7hl"]
|
||||
|
||||
[node name="Enemy20IQ" type="RigidBody2D"]
|
||||
[node name="IQEnemy" type="RigidBody2D"]
|
||||
collision_layer = 8
|
||||
collision_mask = 3
|
||||
script = ExtResource("1_a638n")
|
||||
metadata/IQ = 20
|
||||
metadata/MaxHP = 100.0
|
||||
|
||||
[node name="GroundDetector" type="Area2D" parent="."]
|
||||
position = Vector2(1.1368684e-13, 10.999999)
|
||||
scale = Vector2(0.099999994, 0.099999994)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="GroundDetector"]
|
||||
scale = Vector2(0.99999994, 0.99999994)
|
||||
shape = SubResource("RectangleShape2D_bc7hl")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(9.536743e-07, 5.684342e-14)
|
||||
position = Vector2(9.536743e-07, -1.9999999)
|
||||
scale = Vector2(0.99999994, 0.99999994)
|
||||
sprite_frames = SubResource("SpriteFrames_rqn21")
|
||||
autoplay = "default"
|
||||
|
||||
Reference in New Issue
Block a user