mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Enemy information
This commit is contained in:
parent
fff3ddc3cf
commit
b9b8834bc2
11 changed files with 118 additions and 61 deletions
17
Resources/Enemies/Roaming_Susan.tres
Normal file
17
Resources/Enemies/Roaming_Susan.tres
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
[gd_resource type="Resource" script_class="EnemyResource" load_steps=3 format=3 uid="uid://ij73f6irjcjg"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://cdfmedtgp2rcn" path="res://Resources/Weapons/EnemyWeapon.tres" id="1_bpaea"]
|
||||
[ext_resource type="Script" uid="uid://cd5o0ceb50jki" path="res://Scripts/Resources/EnemyResource.cs" id="2_76vce"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_76vce")
|
||||
EnemyName = &"Robot 2"
|
||||
EnemyKey = &"ROBOT_2"
|
||||
PrefabPath = &"res://Scenes/Actors/RoamingSusan.tscn"
|
||||
MaxHealth = 6.0
|
||||
MovementSpeed = 20.0
|
||||
Weapon = ExtResource("1_bpaea")
|
||||
LootDrops = Array[Object]([])
|
||||
AlarmReactRange = 200.0
|
||||
PlayerDisengageRange = 500.0
|
||||
metadata/_custom_type_script = "uid://cd5o0ceb50jki"
|
||||
17
Resources/Enemies/Thermathron.tres
Normal file
17
Resources/Enemies/Thermathron.tres
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
[gd_resource type="Resource" script_class="EnemyResource" load_steps=3 format=3 uid="uid://cfdvg162u65sr"]
|
||||
|
||||
[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"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("8_x8scf")
|
||||
EnemyName = &"Robot 1"
|
||||
EnemyKey = &"ROBOT_1"
|
||||
PrefabPath = &"res://Scenes/Actors/Thermathron.tscn"
|
||||
MaxHealth = 8.0
|
||||
MovementSpeed = 20.0
|
||||
Weapon = ExtResource("7_filx8")
|
||||
LootDrops = Array[Object]([])
|
||||
AlarmReactRange = 200.0
|
||||
PlayerDisengageRange = 500.0
|
||||
metadata/_custom_type_script = "uid://cd5o0ceb50jki"
|
||||
17
Resources/Enemies/Turret360.tres
Normal file
17
Resources/Enemies/Turret360.tres
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
[gd_resource type="Resource" script_class="EnemyResource" load_steps=3 format=3 uid="uid://ysd6wl2gmdhn"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://dyaxm3st70sh6" path="res://Resources/Weapons/Enemy/TurretWeapon.tres" id="1_yap8t"]
|
||||
[ext_resource type="Script" uid="uid://cd5o0ceb50jki" path="res://Scripts/Resources/EnemyResource.cs" id="2_sma76"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_sma76")
|
||||
EnemyName = &"Rotating Turret"
|
||||
EnemyKey = &"TURRET_360"
|
||||
PrefabPath = &"res://Scenes/Actors/Turret360.tscn"
|
||||
MaxHealth = 14.0
|
||||
MovementSpeed = 0.0
|
||||
Weapon = ExtResource("1_yap8t")
|
||||
LootDrops = Array[Object]([])
|
||||
AlarmReactRange = 200.0
|
||||
PlayerDisengageRange = 500.0
|
||||
metadata/_custom_type_script = "uid://cd5o0ceb50jki"
|
||||
43
Resources/Weapons/Enemy/TurretWeapon.tres
Normal file
43
Resources/Weapons/Enemy/TurretWeapon.tres
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
[gd_resource type="Resource" script_class="WeaponResource" load_steps=7 format=3 uid="uid://dyaxm3st70sh6"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dh81snen2f6bf" path="res://Scenes/Weapons/Bullets/enemyBullet_rice_blue_small.tscn" id="1_uu3nm"]
|
||||
[ext_resource type="Script" uid="uid://b6h8slfcd5suh" path="res://Scripts/Resources/DecreasingSpeedModifier.cs" id="2_1ok24"]
|
||||
[ext_resource type="Script" uid="uid://dslyrfcej3g2n" path="res://Scripts/Resources/BulletResource.cs" id="3_elbjf"]
|
||||
[ext_resource type="Script" uid="uid://b6fmrnipv88bk" path="res://Scripts/Resources/WeaponResource.cs" id="4_17dut"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ktwe0"]
|
||||
script = ExtResource("2_1ok24")
|
||||
decreaseRate = 0.1
|
||||
metadata/_custom_type_script = "uid://b6h8slfcd5suh"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_5eesc"]
|
||||
script = ExtResource("3_elbjf")
|
||||
BulletScene = ExtResource("1_uu3nm")
|
||||
BulletSpeed = 100.0
|
||||
Direction = Vector2(1, 0)
|
||||
BulletDamage = 40.0
|
||||
LifeTime = 10.0
|
||||
DestroyOnCollision = true
|
||||
Owner = 2
|
||||
DamageType = 0
|
||||
Controllable = false
|
||||
Modifier = SubResource("Resource_ktwe0")
|
||||
TimeModifiers = Array[Object]([])
|
||||
metadata/_custom_type_script = "uid://dslyrfcej3g2n"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("4_17dut")
|
||||
Name = null
|
||||
BulletData = SubResource("Resource_5eesc")
|
||||
RateOfFire = 0.4
|
||||
BulletCapacity = 20
|
||||
ReloadTime = 2.0
|
||||
AutoReload = true
|
||||
InfiniteAmmo = true
|
||||
BulletsPerShot = 1
|
||||
SpreadAngle = 0.0
|
||||
RandomSpread = 0.0
|
||||
ItemKey = null
|
||||
AmmoKey = null
|
||||
_rotationOffset = 0.0
|
||||
metadata/_custom_type_script = "uid://b6fmrnipv88bk"
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=37 format=3 uid="uid://bc054js8ep2b"]
|
||||
[gd_scene load_steps=38 format=3 uid="uid://bc054js8ep2b"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c2mo5hc1qb6kf" path="res://Scripts/Components/Actors/Actor.cs" id="1_ugrra"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://ch2ll1on8im2p" path="res://Resources/Sprites/FairyGuard.tres" id="2_i2plx"]
|
||||
[ext_resource type="Resource" uid="uid://qbo6avc7x64b" path="res://Resources/Enemies/Fairy_Guard.tres" id="2_swk2c"]
|
||||
[ext_resource type="Script" uid="uid://tk6ytw246ubg" path="res://Scripts/Components/Actors/EnemyPossessionMovement.cs" id="3_tum7w"]
|
||||
[ext_resource type="Script" uid="uid://dq338w2lw5phl" path="res://Scripts/Components/Actors/KeyboardInputProvider.cs" id="4_3noop"]
|
||||
[ext_resource type="Script" uid="uid://pfxrvd1fofnj" path="res://Scripts/Components/Actors/FourWayAnimationHandler.cs" id="5_yr00f"]
|
||||
|
|
@ -97,8 +98,7 @@ metadata/_custom_type_script = "uid://cq65aed620ijo"
|
|||
collision_layer = 16
|
||||
collision_mask = 113
|
||||
script = ExtResource("1_ugrra")
|
||||
MovementSpeed = 30.0
|
||||
Health = 2.0
|
||||
EnemyData = ExtResource("2_swk2c")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = ExtResource("2_i2plx")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[gd_scene load_steps=19 format=3 uid="uid://dfat0erkvb513"]
|
||||
[gd_scene load_steps=20 format=3 uid="uid://dfat0erkvb513"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c2mo5hc1qb6kf" path="res://Scripts/Components/Actors/Actor.cs" id="1_p2pib"]
|
||||
[ext_resource type="Resource" uid="uid://cocl3qontm3be" path="res://Resources/Enemies/Base_Fairy.tres" id="2_oync8"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://bcc5mlwwnkvri" path="res://Resources/Sprites/Fairy.tres" id="2_ycldt"]
|
||||
[ext_resource type="Script" uid="uid://tk6ytw246ubg" path="res://Scripts/Components/Actors/EnemyPossessionMovement.cs" id="3_bwdr1"]
|
||||
[ext_resource type="Script" uid="uid://dq338w2lw5phl" path="res://Scripts/Components/Actors/KeyboardInputProvider.cs" id="4_5uoep"]
|
||||
|
|
@ -29,8 +30,7 @@ radius = 5.09902
|
|||
collision_layer = 16
|
||||
collision_mask = 113
|
||||
script = ExtResource("1_p2pib")
|
||||
MovementSpeed = 30.0
|
||||
Health = 2.0
|
||||
EnemyData = ExtResource("2_oync8")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = ExtResource("2_ycldt")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=22 format=3 uid="uid://bdvj4cxnyr3w4"]
|
||||
[gd_scene load_steps=23 format=3 uid="uid://bdvj4cxnyr3w4"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c2mo5hc1qb6kf" path="res://Scripts/Components/Actors/Actor.cs" id="1_8mmna"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://ch2ll1on8im2p" path="res://Resources/Sprites/FairyGuard.tres" id="2_7asxc"]
|
||||
[ext_resource type="Resource" uid="uid://cfdvg162u65sr" path="res://Resources/Enemies/Thermathron.tres" id="2_jukx0"]
|
||||
[ext_resource type="Script" uid="uid://tk6ytw246ubg" path="res://Scripts/Components/Actors/EnemyPossessionMovement.cs" id="3_81a26"]
|
||||
[ext_resource type="Script" uid="uid://dq338w2lw5phl" path="res://Scripts/Components/Actors/KeyboardInputProvider.cs" id="4_nr5hj"]
|
||||
[ext_resource type="Script" uid="uid://pfxrvd1fofnj" path="res://Scripts/Components/Actors/FourWayAnimationHandler.cs" id="5_wggo8"]
|
||||
|
|
@ -45,8 +46,7 @@ radius = 5.09902
|
|||
collision_layer = 16
|
||||
collision_mask = 113
|
||||
script = ExtResource("1_8mmna")
|
||||
MovementSpeed = 30.0
|
||||
Health = 6.0
|
||||
EnemyData = ExtResource("2_jukx0")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = ExtResource("2_7asxc")
|
||||
|
|
@ -102,7 +102,6 @@ debug_path_custom_color = Color(1, 0, 0, 1)
|
|||
[node name="HealthProvider" type="Node2D" parent="."]
|
||||
script = ExtResource("9_leabp")
|
||||
ResourceName = "Health"
|
||||
MaxResource = 6.0
|
||||
|
||||
[node name="EnemyWeapon" parent="." instance=ExtResource("10_fduxx")]
|
||||
WeaponData = ExtResource("11_2oavc")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=34 format=3 uid="uid://bjskkeb3ppcs8"]
|
||||
[gd_scene load_steps=29 format=3 uid="uid://bjskkeb3ppcs8"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c2mo5hc1qb6kf" path="res://Scripts/Components/Actors/Actor.cs" id="1_g7c56"]
|
||||
[ext_resource type="Texture2D" uid="uid://c2seclmhd5yt3" path="res://Sprites/Actors/Cannon3D.png" id="2_m663r"]
|
||||
[ext_resource type="Resource" uid="uid://ysd6wl2gmdhn" path="res://Resources/Enemies/Turret360.tres" id="2_x4kwn"]
|
||||
[ext_resource type="Script" uid="uid://tk6ytw246ubg" path="res://Scripts/Components/Actors/EnemyPossessionMovement.cs" id="3_kuwnw"]
|
||||
[ext_resource type="Script" uid="uid://dq338w2lw5phl" path="res://Scripts/Components/Actors/KeyboardInputProvider.cs" id="4_m663r"]
|
||||
[ext_resource type="Script" uid="uid://daoxbq4sxy0br" path="res://Scripts/Components/Actors/TurretAnimationModule.cs" id="5_g7c56"]
|
||||
|
|
@ -9,11 +10,8 @@
|
|||
[ext_resource type="Script" uid="uid://c4qmuxjhheahr" path="res://Scripts/Components/ProximityPlayerDetection.cs" id="8_ktwe0"]
|
||||
[ext_resource type="Script" uid="uid://cqwvssstkrdmw" path="res://Scripts/Components/Actors/ActorResourceProvider.cs" id="9_pyymf"]
|
||||
[ext_resource type="PackedScene" uid="uid://cj63k0dmk7tl1" path="res://Scenes/Weapons/enemy_weapon_base.tscn" id="10_k6dxy"]
|
||||
[ext_resource type="PackedScene" uid="uid://dh81snen2f6bf" path="res://Scenes/Weapons/Bullets/enemyBullet_rice_blue_small.tscn" id="10_kuwnw"]
|
||||
[ext_resource type="Script" uid="uid://b6h8slfcd5suh" path="res://Scripts/Resources/DecreasingSpeedModifier.cs" id="11_84800"]
|
||||
[ext_resource type="Script" uid="uid://dslyrfcej3g2n" path="res://Scripts/Resources/BulletResource.cs" id="11_m663r"]
|
||||
[ext_resource type="Resource" uid="uid://dyaxm3st70sh6" path="res://Resources/Weapons/Enemy/TurretWeapon.tres" id="11_kuwnw"]
|
||||
[ext_resource type="Script" uid="uid://2cijskgyt2xb" path="res://Scripts/Components/Actors/DamageReceiverActorModule.cs" id="12_04r4v"]
|
||||
[ext_resource type="Script" uid="uid://b6fmrnipv88bk" path="res://Scripts/Resources/WeaponResource.cs" id="12_84800"]
|
||||
[ext_resource type="Script" uid="uid://m0ag88kn0c40" path="res://Scripts/Components/Actors/DeathAnimationHandler.cs" id="13_ufa2c"]
|
||||
[ext_resource type="Resource" uid="uid://dk2rbf88a5irh" path="res://Resources/Bullets/Explosion_Harmless.tres" id="14_jal4w"]
|
||||
[ext_resource type="Script" uid="uid://b0qcrs74bdqhf" path="res://Scripts/Components/Actors/EnemyTurretRotationMovement.cs" id="15_g7c56"]
|
||||
|
|
@ -89,43 +87,6 @@ radius = 5.0
|
|||
[sub_resource type="CircleShape2D" id="CircleShape2D_sthwe"]
|
||||
radius = 85.0529
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ktwe0"]
|
||||
script = ExtResource("11_84800")
|
||||
decreaseRate = 0.1
|
||||
metadata/_custom_type_script = "uid://b6h8slfcd5suh"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_5eesc"]
|
||||
script = ExtResource("11_m663r")
|
||||
BulletScene = ExtResource("10_kuwnw")
|
||||
BulletSpeed = 100.0
|
||||
Direction = Vector2(1, 0)
|
||||
BulletDamage = 40.0
|
||||
LifeTime = 10.0
|
||||
DestroyOnCollision = true
|
||||
Owner = 2
|
||||
DamageType = 0
|
||||
Controllable = false
|
||||
Modifier = SubResource("Resource_ktwe0")
|
||||
TimeModifiers = Array[Object]([])
|
||||
metadata/_custom_type_script = "uid://dslyrfcej3g2n"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_hjdpo"]
|
||||
script = ExtResource("12_84800")
|
||||
Name = null
|
||||
BulletData = SubResource("Resource_5eesc")
|
||||
RateOfFire = 0.4
|
||||
BulletCapacity = 20
|
||||
ReloadTime = 2.0
|
||||
AutoReload = true
|
||||
InfiniteAmmo = true
|
||||
BulletsPerShot = 1
|
||||
SpreadAngle = 0.0
|
||||
RandomSpread = 0.0
|
||||
ItemKey = null
|
||||
AmmoKey = null
|
||||
_rotationOffset = 0.0
|
||||
metadata/_custom_type_script = "uid://b6fmrnipv88bk"
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_0tkae"]
|
||||
radius = 5.09902
|
||||
|
||||
|
|
@ -133,8 +94,7 @@ radius = 5.09902
|
|||
collision_layer = 16
|
||||
collision_mask = 113
|
||||
script = ExtResource("1_g7c56")
|
||||
MovementSpeed = 0.0
|
||||
Health = 12.0
|
||||
EnemyData = ExtResource("2_x4kwn")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_k6dxy")
|
||||
|
|
@ -174,10 +134,9 @@ shape = SubResource("CircleShape2D_sthwe")
|
|||
[node name="HealthProvider" type="Node2D" parent="."]
|
||||
script = ExtResource("9_pyymf")
|
||||
ResourceName = "Health"
|
||||
MaxResource = 6.0
|
||||
|
||||
[node name="EnemyWeapon" parent="." instance=ExtResource("10_k6dxy")]
|
||||
WeaponData = SubResource("Resource_hjdpo")
|
||||
WeaponData = ExtResource("11_kuwnw")
|
||||
|
||||
[node name="DamageReceiver" type="Node2D" parent="." node_paths=PackedStringArray("HealthProvider")]
|
||||
script = ExtResource("12_04r4v")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=138 format=4 uid="uid://bv451a8wgty4u"]
|
||||
[gd_scene load_steps=139 format=4 uid="uid://bv451a8wgty4u"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://doxmbokehw8ci" path="res://Scripts/GameManager.cs" id="1_8tmoj"]
|
||||
[ext_resource type="PackedScene" uid="uid://c4pr2707hbeph" path="res://Scenes/Actors/fsm_player.tscn" id="2_ksslq"]
|
||||
|
|
@ -77,6 +77,7 @@
|
|||
[ext_resource type="Script" uid="uid://v57xjmhi28kw" path="res://Scripts/Resources/Events/ControlActorEvent.cs" id="64_rphi8"]
|
||||
[ext_resource type="PackedScene" uid="uid://b0gpbkxdfbnjh" path="res://Scenes/Actors/ForceField_Horizontal.tscn" id="66_nxn3h"]
|
||||
[ext_resource type="PackedScene" uid="uid://cjsnhyl0nqbau" path="res://Scenes/Props/ICCTv.tscn" id="71_ji7au"]
|
||||
[ext_resource type="Resource" uid="uid://cfdvg162u65sr" path="res://Resources/Enemies/Thermathron.tres" id="71_xhinl"]
|
||||
[ext_resource type="PackedScene" uid="uid://cyy5i38sf7fid" path="res://Scenes/Props/Locker.tscn" id="72_fasrq"]
|
||||
[ext_resource type="PackedScene" uid="uid://bc054js8ep2b" path="res://Scenes/Actors/FairyGuard_New.tscn" id="73_cfpaq"]
|
||||
[ext_resource type="PackedScene" uid="uid://bdvj4cxnyr3w4" path="res://Scenes/Actors/Thermathron.tscn" id="73_ier4h"]
|
||||
|
|
@ -899,6 +900,7 @@ label_settings = ExtResource("14_c4c20")
|
|||
|
||||
[node name="ActorEnemyTest" parent="Parallax2D/Factory Tilemaps/LevelProps/Computer4" instance=ExtResource("55_chha6")]
|
||||
position = Vector2(290, 79)
|
||||
EnemyData = ExtResource("71_xhinl")
|
||||
|
||||
[node name="Ammo1" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("34_17pjh")]
|
||||
position = Vector2(-792, -396)
|
||||
|
|
@ -1121,7 +1123,7 @@ position = Vector2(-2000, -736)
|
|||
[node name="ControlPad8" parent="Parallax2D/Factory Tilemaps/LevelProps" node_paths=PackedStringArray("Targets") instance=ExtResource("12_hfkf1")]
|
||||
position = Vector2(-2027, -735)
|
||||
Targets = [NodePath("../HorizontalForceField")]
|
||||
Requirements = Array[ExtResource("6_8tdlb")]([ExtResource("84_ma1ta")])
|
||||
Requirements = [ExtResource("84_ma1ta")]
|
||||
|
||||
[node name="Ammo6" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("34_17pjh")]
|
||||
position = Vector2(-872, -220)
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
using System.Collections.Generic;
|
||||
using Cirno.Scripts;
|
||||
using Cirno.Scripts.Components.Actors;
|
||||
using Cirno.Scripts.Resources;
|
||||
using Godot;
|
||||
|
||||
public partial class Actor : CharacterBody2D
|
||||
{
|
||||
[Export]
|
||||
public float MovementSpeed { get; private set; } = 20f;
|
||||
public EnemyResource EnemyData { get; private set; }
|
||||
|
||||
[Export]
|
||||
public float Health { get; private set; } = 4f;
|
||||
public float MovementSpeed => EnemyData.MovementSpeed;
|
||||
|
||||
public float Health => EnemyData.MaxHealth;
|
||||
|
||||
[ExportCategory("Defeat Script")]
|
||||
[Export] public Node2D DefeatScript { get; set; }
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ public partial class EnemyResource : Resource
|
|||
[Export] public StringName EnemyKey { get; private set; }
|
||||
[Export] public StringName PrefabPath { get; private set; }
|
||||
[Export] public float MaxHealth { get; private set; }
|
||||
[Export] public float MovementSpeed { get; private set; } = 20f;
|
||||
[Export] public DamageResistance Resistances { get; private set; }
|
||||
[Export] public WeaponResource Weapon { get; private set; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue