cirnogodot/Scripts/Resources/EnemyResource.cs
2025-08-05 16:24:21 +02:00

45 lines
No EOL
2 KiB
C#

using Cirno.Scripts.Resources.Loot;
using Cirno.Scripts.Resources.ScriptableBullets;
using Godot;
using Godot.Collections;
namespace Cirno.Scripts.Resources;
[GlobalClass]
[Tool]
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; }
[Export] public float MovementSpeed { get; private set; } = 20f;
[Export] public DamageResistance Resistances { get; private set; }
[Export] public WeaponResource Weapon { get; private set; }
[Export] public Array<LootDrop> LootDrops { get; private set; } = [];
[Export] public float MotivationReward { get; private set; } = 4f;
[Export] public bool PredictPlayer { get; private set; } = false;
[ExportCategory("AI")] [Export] public float PlayerDetectionRange { get; private set; } = 90f;
[Export] public float ViewRange { get; private set; } = 120f;
[Export] public float AlarmReactRange { get; private set; }
[Export] public float PlayerDisengageRange { get; private set; }
[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;
[ExportCategory("Graphics")]
[Export] public Texture2D IconSprite { get; private set; }
[Export] public SpriteFrames AnimationFrames { get; private set; }
[Export] public PackedScene DebrisScene { get; private set; }
[Export] public SpriteFrames DeathAnimation { get; private set; }
[ExportCategory("Scripts")]
[Export] public BossScript BossScript { get; private set; }
}