cirnogodot/Scripts/Resources/EnemyResource.cs

50 lines
2.2 KiB
C#
Raw Normal View History

2025-03-20 11:15:37 +01:00
using Cirno.Scripts.Resources.Loot;
2025-06-03 10:11:09 +02:00
using Cirno.Scripts.Resources.ScriptableBullets;
2025-03-20 11:15:37 +01:00
using Godot;
using Godot.Collections;
namespace Cirno.Scripts.Resources;
[GlobalClass]
[Tool]
2025-03-20 11:15:37 +01:00
public partial class EnemyResource : Resource
{
[Export] public StringName EnemyName { get; private set; }
[Export] public StringName EnemyKey { get; private set; }
[Export] public StringName PrefabPath { get; private set; }
[Export] public float MaxHealth { get; private set; }
2025-03-20 11:34:48 +01:00
[Export] public float MovementSpeed { get; private set; } = 20f;
2025-03-20 11:15:37 +01:00
[Export] public DamageResistance Resistances { get; private set; }
[Export] public WeaponResource Weapon { get; private set; }
2025-03-21 16:03:44 +01:00
[Export] public Array<LootDrop> LootDrops { get; private set; } = [];
2025-03-31 18:28:33 +02:00
[Export] public float MotivationReward { get; private set; } = 4f;
[Export] public bool PredictPlayer { get; private set; } = false;
2025-03-20 18:22:40 +01:00
[ExportCategory("AI")] [Export] public float PlayerDetectionRange { get; private set; } = 90f;
2025-03-21 10:30:44 +01:00
[Export] public float ViewRange { get; private set; } = 120f;
2025-03-20 11:15:37 +01:00
[Export] public float AlarmReactRange { get; private set; }
[Export] public float PlayerDisengageRange { get; private set; }
2025-03-25 15:15:04 +01:00
[Export] public float StrafeSpeed { get; private set; } = 25f;
[Export] public float MaxStrafeDistance { get; private set; } = 64f;
[Export] public float MinStrafeDistance { get; private set; } = 16f;
/// <summary>
/// Time it takes for the enemy to change strafing direction
/// </summary>
[Export] public float ResponseTime { get; private set; } = 0.5f;
2025-08-05 16:24:21 +02:00
[ExportCategory("Graphics")]
[Export] public Texture2D IconSprite { get; private set; }
2025-06-03 10:11:09 +02:00
[Export] public SpriteFrames AnimationFrames { get; private set; }
2025-08-05 16:24:21 +02:00
[Export] public PackedScene DebrisScene { get; private set; }
[Export] public SpriteFrames DeathAnimation { get; private set; }
[ExportCategory("Scripts")]
2025-06-03 10:11:09 +02:00
[Export] public BossScript BossScript { get; private set; }
2025-09-11 14:10:14 +02:00
[ExportCategory("Sounds")]
[Export] public AudioStream HitSound { get; private set; }
[Export] public AudioStream DeathSound { get; private set; }
[Export] public AudioStream AlertSound { get; private set; }
2025-03-20 11:15:37 +01:00
}