mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-14 20:33:48 +00:00
Enemy AI
This commit is contained in:
parent
383fc740df
commit
ede8f2028a
34 changed files with 1418 additions and 417 deletions
31
Scripts/Components/FSM/Enemy/3D/EnemyStorage3D.cs
Normal file
31
Scripts/Components/FSM/Enemy/3D/EnemyStorage3D.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Cirno.Scripts.Resources;
|
||||
using Cirno.Scripts.Resources.Loot;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Components.FSM.Enemy._3D;
|
||||
|
||||
public partial class EnemyStorage3D : Node
|
||||
{
|
||||
[Export]
|
||||
public EnemyProxy3D Root { get; private set; }
|
||||
|
||||
public Node3D RootAsNode => Root;
|
||||
|
||||
public EnemyResource EnemyData => Root.EnemyResource;
|
||||
|
||||
public Vector3 HomePosition { get; set; }
|
||||
|
||||
public Vector2 MovementDirection { get; set; }
|
||||
public Vector2 FacingDirection { get; set; }
|
||||
|
||||
public Vector2 AimingDirection { get; set; }
|
||||
public Vector3 KnockbackVelocity { get; set; } = Vector3.Zero;
|
||||
|
||||
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; }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue