Controllable enemies

This commit is contained in:
Marco 2025-03-21 17:52:01 +01:00
commit 0aad79a0f8
18 changed files with 893 additions and 23 deletions

View file

@ -45,10 +45,11 @@ EnemyName = &"Fairy Guard"
EnemyKey = &"FAIRY_GUARD"
PrefabPath = &"res://Scenes/Actors/FairyGuard_New.tscn"
MaxHealth = 4.0
MovementSpeed = 20.0
MovementSpeed = 30.0
Weapon = ExtResource("7_xlxdc")
LootDrops = Array[Object]([SubResource("Resource_c8nix"), SubResource("Resource_gs2l3"), SubResource("Resource_sqnvg"), SubResource("Resource_5tyar"), SubResource("Resource_48xq6")])
PlayerDetectionRange = 90.0
ViewRange = 120.0
AlarmReactRange = 200.0
PlayerDisengageRange = 500.0
metadata/_custom_type_script = "uid://cd5o0ceb50jki"

View file

@ -1,5 +1,6 @@
[gd_resource type="Resource" script_class="EnemyResource" load_steps=3 format=3 uid="uid://cfdvg162u65sr"]
[gd_resource type="Resource" script_class="EnemyResource" load_steps=4 format=3 uid="uid://cfdvg162u65sr"]
[ext_resource type="Script" uid="uid://cq65aed620ijo" path="res://Scripts/Resources/Loot/LootDrop.cs" id="1_f3huq"]
[ext_resource type="Resource" uid="uid://cdfmedtgp2rcn" path="res://Resources/Weapons/EnemyWeapon.tres" id="7_filx8"]
[ext_resource type="Script" uid="uid://cd5o0ceb50jki" path="res://Scripts/Resources/EnemyResource.cs" id="8_x8scf"]
@ -9,10 +10,11 @@ EnemyName = &"Robot 1"
EnemyKey = &"ROBOT_1"
PrefabPath = &"res://Scenes/Actors/Thermathron.tscn"
MaxHealth = 8.0
MovementSpeed = 20.0
MovementSpeed = 35.0
Weapon = ExtResource("7_filx8")
LootDrops = Array[Object]([])
LootDrops = Array[ExtResource("1_f3huq")]([])
PlayerDetectionRange = 90.0
ViewRange = 120.0
AlarmReactRange = 200.0
PlayerDisengageRange = 500.0
metadata/_custom_type_script = "uid://cd5o0ceb50jki"

View file

@ -1,4 +1,4 @@
[gd_resource type="SpriteFrames" load_steps=10 format=3 uid="uid://bcc5mlwwnkvri"]
[gd_resource type="SpriteFrames" load_steps=11 format=3 uid="uid://bcc5mlwwnkvri"]
[ext_resource type="Texture2D" uid="uid://xgxxdq37pykh" path="res://Sprites/Actors/Fairy.png" id="1_dnfgi"]
@ -30,7 +30,11 @@ region = Rect2(16, 16, 16, 16)
atlas = ExtResource("1_dnfgi")
region = Rect2(0, 48, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_c2w8n"]
[sub_resource type="AtlasTexture" id="AtlasTexture_6os6y"]
atlas = ExtResource("1_dnfgi")
region = Rect2(0, 48, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_m2qbo"]
atlas = ExtResource("1_dnfgi")
region = Rect2(16, 48, 16, 16)
@ -74,7 +78,10 @@ animations = [{
"texture": SubResource("AtlasTexture_cciyq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_c2w8n")
"texture": SubResource("AtlasTexture_6os6y")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_m2qbo")
}],
"loop": true,
"name": &"up",

View file

@ -0,0 +1,110 @@
[gd_resource type="SpriteFrames" load_steps=14 format=3 uid="uid://tei88ni5rpc"]
[ext_resource type="Texture2D" uid="uid://hukxr2e63gky" path="res://Sprites/Actors/Robot3.png" id="1_rrwlm"]
[sub_resource type="AtlasTexture" id="AtlasTexture_rrwlm"]
atlas = ExtResource("1_rrwlm")
region = Rect2(0, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_bpw12"]
atlas = ExtResource("1_rrwlm")
region = Rect2(16, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_jbf8a"]
atlas = ExtResource("1_rrwlm")
region = Rect2(32, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_ifusk"]
atlas = ExtResource("1_rrwlm")
region = Rect2(0, 192, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_a8tyn"]
atlas = ExtResource("1_rrwlm")
region = Rect2(16, 192, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_suo30"]
atlas = ExtResource("1_rrwlm")
region = Rect2(32, 192, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_hr00v"]
atlas = ExtResource("1_rrwlm")
region = Rect2(0, 64, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_edorv"]
atlas = ExtResource("1_rrwlm")
region = Rect2(16, 64, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_2f6bp"]
atlas = ExtResource("1_rrwlm")
region = Rect2(32, 64, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_yfk7l"]
atlas = ExtResource("1_rrwlm")
region = Rect2(0, 128, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_xk2rf"]
atlas = ExtResource("1_rrwlm")
region = Rect2(16, 128, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_8f6o6"]
atlas = ExtResource("1_rrwlm")
region = Rect2(32, 128, 16, 32)
[resource]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_rrwlm")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bpw12")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jbf8a")
}],
"loop": true,
"name": &"down",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ifusk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_a8tyn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_suo30")
}],
"loop": true,
"name": &"left",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_hr00v")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_edorv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_2f6bp")
}],
"loop": true,
"name": &"right",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_yfk7l")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xk2rf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8f6o6")
}],
"loop": true,
"name": &"up",
"speed": 5.0
}]