mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:05:34 +00:00
Enemy spawning
This commit is contained in:
parent
ede8f2028a
commit
29dc9bebe0
20 changed files with 564 additions and 105 deletions
|
|
@ -6,9 +6,9 @@
|
|||
[resource]
|
||||
script = ExtResource("2_5nrie")
|
||||
BulletScene = ExtResource("1_l7ter")
|
||||
BulletSpeed = 2.0
|
||||
BulletSpeed = 1.8
|
||||
Direction = Vector2(1, 0)
|
||||
BulletDamage = 12.0
|
||||
BulletDamage = 8.0
|
||||
MaxDamage = 1.0
|
||||
Knockback = 1.0
|
||||
LifeTime = 10.0
|
||||
|
|
|
|||
24
Resources/Bullets/simple_enemy_bullet_small_3D.tres
Normal file
24
Resources/Bullets/simple_enemy_bullet_small_3D.tres
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[gd_resource type="Resource" script_class="BulletResource" load_steps=3 format=3 uid="uid://qrqsywgiij7i"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c133312rx63ps" path="res://Scenes/Weapons/base_enemy_bullet_3D_small.tscn" id="1_pm333"]
|
||||
[ext_resource type="Script" uid="uid://dslyrfcej3g2n" path="res://Scripts/Resources/BulletResource.cs" id="2_4bl80"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_4bl80")
|
||||
BulletScene = ExtResource("1_pm333")
|
||||
BulletSpeed = 2.0
|
||||
Direction = Vector2(1, 0)
|
||||
BulletDamage = 12.0
|
||||
MaxDamage = 1.0
|
||||
Knockback = 1.0
|
||||
LifeTime = 10.0
|
||||
DestroyOnCollision = true
|
||||
Owner = 2
|
||||
DamageType = 0
|
||||
RotateSprite = false
|
||||
Controllable = false
|
||||
Freezable = true
|
||||
Grazeable = true
|
||||
GrazeValue = 1.0
|
||||
Attributes = 290
|
||||
TimeModifiers = []
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
[gd_resource type="Resource" script_class="EnemyResource" load_steps=16 format=3 uid="uid://cocl3qontm3be"]
|
||||
[gd_resource type="Resource" script_class="EnemyResource" load_steps=17 format=3 uid="uid://cocl3qontm3be"]
|
||||
|
||||
[ext_resource type="SpriteFrames" uid="uid://chjsokgyo0e33" path="res://Resources/Sprites/base_fairy.tres" id="1_ppsgt"]
|
||||
[ext_resource type="Resource" uid="uid://ct1fa2huvy34n" path="res://Resources/Items/Ammo1.tres" id="1_q1ekm"]
|
||||
[ext_resource type="Texture2D" uid="uid://xgxxdq37pykh" path="res://Sprites/Actors/Fairy.png" id="1_sxbtw"]
|
||||
[ext_resource type="Script" uid="uid://cq65aed620ijo" path="res://Scripts/Resources/Loot/LootDrop.cs" id="2_sxbtw"]
|
||||
|
|
@ -64,4 +65,5 @@ MaxStrafeDistance = 16.0
|
|||
MinStrafeDistance = 8.0
|
||||
ResponseTime = 0.5
|
||||
IconSprite = SubResource("AtlasTexture_ppsgt")
|
||||
AnimationFrames = ExtResource("1_ppsgt")
|
||||
metadata/_custom_type_script = "uid://cd5o0ceb50jki"
|
||||
|
|
|
|||
69
Resources/Enemies/Base_Fairy_3D.tres
Normal file
69
Resources/Enemies/Base_Fairy_3D.tres
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
[gd_resource type="Resource" script_class="EnemyResource" load_steps=17 format=3 uid="uid://4qxicyti4hwr"]
|
||||
|
||||
[ext_resource type="SpriteFrames" uid="uid://chjsokgyo0e33" path="res://Resources/Sprites/base_fairy.tres" id="1_gbbb4"]
|
||||
[ext_resource type="Texture2D" uid="uid://xgxxdq37pykh" path="res://Sprites/Actors/Fairy.png" id="1_ihub2"]
|
||||
[ext_resource type="Script" uid="uid://cq65aed620ijo" path="res://Scripts/Resources/Loot/LootDrop.cs" id="2_gbbb4"]
|
||||
[ext_resource type="Resource" uid="uid://ct1fa2huvy34n" path="res://Resources/Items/Ammo1.tres" id="3_6fuej"]
|
||||
[ext_resource type="Resource" uid="uid://dy53gia1tmkah" path="res://Resources/Items/Points_Pickup.tres" id="4_oni0r"]
|
||||
[ext_resource type="Resource" uid="uid://bhbufxodybsw4" path="res://Resources/Items/Shield_Pickup.tres" id="5_kno8n"]
|
||||
[ext_resource type="Resource" uid="uid://dodwpect0ldjf" path="res://Resources/Items/Heart_Pickup.tres" id="6_jnpnu"]
|
||||
[ext_resource type="Resource" uid="uid://clr1gln7nxa1o" path="res://Resources/Items/Power_Pickup.tres" id="7_rx5mb"]
|
||||
[ext_resource type="Resource" uid="uid://co6x2jq0fslql" path="res://Resources/Weapons/EnemyWeapon_Small_3D.tres" id="8_ihub2"]
|
||||
[ext_resource type="Script" uid="uid://cd5o0ceb50jki" path="res://Scripts/Resources/EnemyResource.cs" id="9_fmns5"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ppsgt"]
|
||||
atlas = ExtResource("1_ihub2")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_c8nix"]
|
||||
script = ExtResource("2_gbbb4")
|
||||
Item = ExtResource("3_6fuej")
|
||||
Chance = 40.0
|
||||
metadata/_custom_type_script = "uid://cq65aed620ijo"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gs2l3"]
|
||||
script = ExtResource("2_gbbb4")
|
||||
Item = ExtResource("4_oni0r")
|
||||
Chance = 10.0
|
||||
metadata/_custom_type_script = "uid://cq65aed620ijo"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_sqnvg"]
|
||||
script = ExtResource("2_gbbb4")
|
||||
Item = ExtResource("5_kno8n")
|
||||
Chance = 5.0
|
||||
metadata/_custom_type_script = "uid://cq65aed620ijo"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_5tyar"]
|
||||
script = ExtResource("2_gbbb4")
|
||||
Item = ExtResource("6_jnpnu")
|
||||
Chance = 5.0
|
||||
metadata/_custom_type_script = "uid://cq65aed620ijo"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_48xq6"]
|
||||
script = ExtResource("2_gbbb4")
|
||||
Item = ExtResource("7_rx5mb")
|
||||
Chance = 6.0
|
||||
metadata/_custom_type_script = "uid://cq65aed620ijo"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("9_fmns5")
|
||||
EnemyName = &"Fairy"
|
||||
EnemyKey = &"FAIRY_BASE"
|
||||
PrefabPath = &"uid://bh3vxmqflijgj"
|
||||
MaxHealth = 4.0
|
||||
MovementSpeed = 1.5
|
||||
Weapon = ExtResource("8_ihub2")
|
||||
LootDrops = Array[ExtResource("2_gbbb4")]([SubResource("Resource_c8nix"), SubResource("Resource_gs2l3"), SubResource("Resource_sqnvg"), SubResource("Resource_5tyar"), SubResource("Resource_48xq6")])
|
||||
MotivationReward = 4.0
|
||||
PredictPlayer = false
|
||||
PlayerDetectionRange = 4.0
|
||||
ViewRange = 5.0
|
||||
AlarmReactRange = 8.0
|
||||
PlayerDisengageRange = 10.0
|
||||
StrafeSpeed = 1.5
|
||||
MaxStrafeDistance = 1.0
|
||||
MinStrafeDistance = 0.2
|
||||
ResponseTime = 0.5
|
||||
IconSprite = SubResource("AtlasTexture_ppsgt")
|
||||
AnimationFrames = ExtResource("1_gbbb4")
|
||||
metadata/_custom_type_script = "uid://cd5o0ceb50jki"
|
||||
85
Resources/Sprites/base_fairy.tres
Normal file
85
Resources/Sprites/base_fairy.tres
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
[gd_resource type="SpriteFrames" load_steps=10 format=3 uid="uid://chjsokgyo0e33"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://xgxxdq37pykh" path="res://Sprites/Actors/Fairy.png" id="1_ierex"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_13sn2"]
|
||||
atlas = ExtResource("1_ierex")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qs3gm"]
|
||||
atlas = ExtResource("1_ierex")
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fppxn"]
|
||||
atlas = ExtResource("1_ierex")
|
||||
region = Rect2(0, 32, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_b01sl"]
|
||||
atlas = ExtResource("1_ierex")
|
||||
region = Rect2(16, 32, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jgccb"]
|
||||
atlas = ExtResource("1_ierex")
|
||||
region = Rect2(0, 16, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v7nm4"]
|
||||
atlas = ExtResource("1_ierex")
|
||||
region = Rect2(16, 16, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_k8fan"]
|
||||
atlas = ExtResource("1_ierex")
|
||||
region = Rect2(0, 48, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ierex"]
|
||||
atlas = ExtResource("1_ierex")
|
||||
region = Rect2(16, 48, 16, 16)
|
||||
|
||||
[resource]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_13sn2")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qs3gm")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"down",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fppxn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_b01sl")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"left",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_jgccb")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_v7nm4")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"right",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_k8fan")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_k8fan")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ierex")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"up",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
|
@ -1,30 +1,29 @@
|
|||
[gd_resource type="SpriteFrames" load_steps=11 format=3 uid="uid://cnl6ju3qlr2bj"]
|
||||
[gd_resource type="SpriteFrames" load_steps=10 format=3 uid="uid://cnl6ju3qlr2bj"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://xgxxdq37pykh" path="res://Sprites/Actors/Fairy.png" id="1_jhe43"]
|
||||
[ext_resource type="Texture2D" uid="uid://callpd48wwnlw" path="res://Sprites/Actors/Fairy_Special.png" id="2_ucisl"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_13sn2"]
|
||||
atlas = ExtResource("1_jhe43")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jhe43"]
|
||||
atlas = ExtResource("2_ucisl")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qs3gm"]
|
||||
atlas = ExtResource("1_jhe43")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ucisl"]
|
||||
atlas = ExtResource("2_ucisl")
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fppxn"]
|
||||
atlas = ExtResource("1_jhe43")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_t6dpn"]
|
||||
atlas = ExtResource("2_ucisl")
|
||||
region = Rect2(0, 32, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_b01sl"]
|
||||
atlas = ExtResource("1_jhe43")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g84mp"]
|
||||
atlas = ExtResource("2_ucisl")
|
||||
region = Rect2(16, 32, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jgccb"]
|
||||
atlas = ExtResource("1_jhe43")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g3joa"]
|
||||
atlas = ExtResource("2_ucisl")
|
||||
region = Rect2(0, 16, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v7nm4"]
|
||||
atlas = ExtResource("1_jhe43")
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_geb4s"]
|
||||
atlas = ExtResource("2_ucisl")
|
||||
region = Rect2(16, 16, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pt5ys"]
|
||||
|
|
@ -39,10 +38,10 @@ region = Rect2(16, 48, 16, 16)
|
|||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_13sn2")
|
||||
"texture": SubResource("AtlasTexture_jhe43")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qs3gm")
|
||||
"texture": SubResource("AtlasTexture_ucisl")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"down",
|
||||
|
|
@ -50,10 +49,10 @@ animations = [{
|
|||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fppxn")
|
||||
"texture": SubResource("AtlasTexture_t6dpn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_b01sl")
|
||||
"texture": SubResource("AtlasTexture_g84mp")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"left",
|
||||
|
|
@ -61,10 +60,10 @@ animations = [{
|
|||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_jgccb")
|
||||
"texture": SubResource("AtlasTexture_g3joa")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_v7nm4")
|
||||
"texture": SubResource("AtlasTexture_geb4s")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"right",
|
||||
|
|
|
|||
22
Resources/Weapons/EnemyWeapon_Small_3D.tres
Normal file
22
Resources/Weapons/EnemyWeapon_Small_3D.tres
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
[gd_resource type="Resource" script_class="WeaponResource" load_steps=3 format=3 uid="uid://co6x2jq0fslql"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://qrqsywgiij7i" path="res://Resources/Bullets/simple_enemy_bullet_small_3D.tres" id="1_mw07s"]
|
||||
[ext_resource type="Script" uid="uid://b6fmrnipv88bk" path="res://Scripts/Resources/WeaponResource.cs" id="2_gpx82"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_gpx82")
|
||||
Name = &"Enemy weapon with big bullets"
|
||||
BulletData = ExtResource("1_mw07s")
|
||||
Priority = 0
|
||||
AmmoPerShot = 1
|
||||
RateOfFire = 0.6
|
||||
BulletCapacity = 4
|
||||
ReloadTime = 1.0
|
||||
AutoReload = true
|
||||
InfiniteAmmo = true
|
||||
ItemKey = &""
|
||||
AmmoKey = &""
|
||||
BulletsPerShot = 1
|
||||
SpreadAngle = 0.0
|
||||
RandomSpread = 0.0
|
||||
_rotationOffset = 0.0
|
||||
Loading…
Add table
Add a link
Reference in a new issue