Skip to content

Commit

Permalink
colonist now cancel animation when no target is found and still anima…
Browse files Browse the repository at this point in the history
…te when mining a node afterwards
  • Loading branch information
mrKrastev committed Mar 15, 2020
1 parent 0c14e48 commit d053547
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public bool InCombat
if (value == false)
{
TextureGroupIndex = 0;
IsAttacking = false;
}

}
Expand Down Expand Up @@ -212,10 +213,11 @@ public override void Update(GameTime gameTime)

if (delta.Equals(Vector2.Zero))
{
if (!IsAttacking)
if (!IsAttacking && instructions.Count==0)
{
//TextureGroupIndex = 0;
//isAnimated = false;
TextureGroupIndex = 0;


}
}
else if (Math.Abs(delta.X) >= Math.Abs(delta.Y))
Expand Down Expand Up @@ -244,8 +246,12 @@ public override void Update(GameTime gameTime)
}
else
{
combatModeOn = false;

if (combatModeOn)
{
IsAttacking = false;
combatModeOn = false;
}

}
if (combatModeOn)
{
Expand Down Expand Up @@ -437,6 +443,7 @@ private void ColonistAttack(GameTime gameTime)
this.InCombat = false;
this.IsAttacking = false;


}
}

Expand Down

0 comments on commit d053547

Please sign in to comment.