fix StunTime not decrementing when rolling

wip-inventory
John Montagu, the 4th Earl of Sandvich 2023-12-29 20:15:23 -08:00
parent 3230e487f2
commit 8fd60cb3c8
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
2 changed files with 5 additions and 5 deletions

View File

@ -116,6 +116,11 @@ public partial class Character : CharacterBody2D, IFaction
public override void _Process(double delta) public override void _Process(double delta)
{ {
if (StunTime > 0)
{
StunTime -= delta;
}
if (StateMachine != null) if (StateMachine != null)
{ {
StateMachine.Process(delta); StateMachine.Process(delta);

View File

@ -18,11 +18,6 @@ public abstract partial class CharacterState : Node, IState<CharacterState>
public virtual CharacterState Process(double delta) public virtual CharacterState Process(double delta)
{ {
if (Character.StunTime > 0)
{
Character.StunTime -= delta;
}
var item = Character.Inventory.SelectedItem; var item = Character.Inventory.SelectedItem;
bool targetTowards(Items.Item item) bool targetTowards(Items.Item item)