cirnogodot/Scripts/Components/FSM/Enemy/EnemyStorageModule.cs
2025-04-28 18:06:07 +02:00

32 lines
No EOL
901 B
C#

using System.Collections.Generic;
using System.Linq;
using Cirno.Scripts.Resources;
using Cirno.Scripts.Resources.Loot;
using Godot;
using Godot.Collections;
namespace Cirno.Scripts.Components.FSM.Enemy;
public partial class EnemyStorageModule : Node2D, IFSMStorage
{
[Export]
public EnemyFSMProxy Root { get; private set; }
public Node2D RootAsNode => Root;
public EnemyResource EnemyData => Root.EnemyResource;
public Vector2 HomePosition { get; set; }
public Vector2 MovementDirection { get; set; }
public Vector2 FacingDirection { get; set; }
public Vector2 AimingDirection { get; set; }
public float MovementSpeed => Root.EnemyResource.MovementSpeed;
public IEnumerable<LootDrop> LootDrops => Root.OverrideLoot ? Root.ExtraLoot : Root.EnemyResource.LootDrops.Concat(Root.ExtraLoot);
public AiState AiState { get; set; }
}