2023-07-13 23:46:58 -07:00
|
|
|
using Godot;
|
2023-07-23 23:39:20 -07:00
|
|
|
using GodotUtilities;
|
2023-07-13 23:46:58 -07:00
|
|
|
|
|
|
|
namespace SupaLidlGame.State.NPC.Doc;
|
|
|
|
|
2023-07-17 20:18:42 -07:00
|
|
|
public abstract partial class DocAttackState : NPCState
|
2023-07-13 23:46:58 -07:00
|
|
|
{
|
2023-07-17 20:18:42 -07:00
|
|
|
public abstract double Duration { get; set; }
|
2023-07-13 23:46:58 -07:00
|
|
|
|
2023-07-17 20:18:42 -07:00
|
|
|
public abstract double AttackDuration { get; set; }
|
2023-07-13 23:46:58 -07:00
|
|
|
|
2023-07-17 20:18:42 -07:00
|
|
|
public abstract PackedScene Projectile { get; set; }
|
2023-07-13 23:46:58 -07:00
|
|
|
|
2023-07-18 00:57:28 -07:00
|
|
|
public abstract DocChooseAttackState ChooseAttackState { get; set; }
|
2023-07-13 23:46:58 -07:00
|
|
|
|
2023-07-23 23:39:20 -07:00
|
|
|
protected Scenes.Map _map;
|
|
|
|
protected Utils.World _world;
|
|
|
|
protected Characters.Doc _doc;
|
|
|
|
protected double _currentDuration = 0;
|
|
|
|
protected double _currentAttackDuration = 0;
|
|
|
|
|
|
|
|
public override void _Ready()
|
|
|
|
{
|
|
|
|
_doc = NPC as Characters.Doc;
|
|
|
|
}
|
|
|
|
|
|
|
|
public override NPCState Enter(IState<NPCState> previousState)
|
|
|
|
{
|
|
|
|
_map = this.GetAncestor<Scenes.Map>();
|
|
|
|
_world = this.GetAncestor<Utils.World>();
|
|
|
|
_currentDuration = Duration;
|
|
|
|
_currentAttackDuration = AttackDuration;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2023-07-17 20:18:42 -07:00
|
|
|
protected abstract void Attack();
|
2023-07-13 23:46:58 -07:00
|
|
|
}
|