SupaLidlGame/Items/Weapons/Ranged.cs

44 lines
979 B
C#
Raw Normal View History

2023-05-15 00:20:17 -07:00
using Godot;
namespace SupaLidlGame.Items.Weapons
{
public abstract partial class Ranged : Weapon
{
[Export]
public float AngleDeviation { get; set; }
[Export]
public float ChargeTime { get; set; }
2023-05-26 22:28:08 -07:00
[Export]
public State.Weapon.WeaponStateMachine StateMachine { get; set; }
2023-05-15 00:20:17 -07:00
2023-05-26 22:28:08 -07:00
public override bool IsUsing => StateMachine.CurrentState
is State.Weapon.RangedFireState;
public bool IsChargeable => ChargeTime > 0;
2023-05-15 00:20:17 -07:00
public bool IsCharging { get; protected set; }
public override void Use()
{
2023-05-26 22:28:08 -07:00
StateMachine.Use();
2023-05-15 00:20:17 -07:00
base.Use();
}
public override void Deuse()
{
2023-05-26 22:28:08 -07:00
StateMachine.Deuse();
2023-05-15 00:20:17 -07:00
base.Deuse();
}
public override void _Process(double delta)
{
2023-05-26 22:28:08 -07:00
StateMachine.Process(delta);
2023-05-15 00:20:17 -07:00
base._Process(delta);
}
public abstract void Attack();
}
}