public override void Update(float time, TileGrid navigationGrid) { if (myHP > 0) { base.Update(time, navigationGrid); movement.ChangeDirection(navigationGrid, ref targetPos); //if (attack.Execute(playerStates)) // movement.MoveInFacedDirection(navigationGrid, ref targetPos); SetDirection(targetPos); if (movement.ReachedDestination(targetPos, this)) { myDirection = Vector2.Zero; myPosition = targetPos; } playerStates.HandlePlayerStates(time); } }