fixed jack bug levitating

This commit is contained in:
2020-02-02 13:21:44 -05:00
parent 3944996031
commit 401ae023a2
10 changed files with 485 additions and 86 deletions

View File

@@ -269,6 +269,8 @@ public class Player : MonoBehaviour
isPlayerHurt = false;
isFighting = true;
isMovementEnabled = false;
rigidBody.gravityScale = 0f;
rigidBody.velocity = Vector2.zero;
}
public void EndEncounter()
@@ -276,6 +278,7 @@ public class Player : MonoBehaviour
isPlayerHurt = false;
isFighting = false;
isMovementEnabled = true;
rigidBody.gravityScale = 1f;
DecreaseStaminaAfterBugFight();
}
@@ -285,5 +288,6 @@ public class Player : MonoBehaviour
GetComponent<Rigidbody2D>().velocity += new Vector2(Mathf.Sign(transform.localScale.x) * -1 * hurtVelocity, hurtVelocity);
isFighting = false;
isHurt = true;
Hurt();
}
}