fix StunTime not decrementing when rolling
parent
3230e487f2
commit
8fd60cb3c8
|
@ -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);
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue