changes
This commit is contained in:
@@ -74,10 +74,12 @@ public class BugMovement : MonoBehaviour
|
||||
public void DisableMovement()
|
||||
{
|
||||
isMovementDisabled = true;
|
||||
rigidBody.constraints = RigidbodyConstraints2D.FreezeAll;
|
||||
}
|
||||
|
||||
public void EnableMovement()
|
||||
{
|
||||
isMovementDisabled = false;
|
||||
rigidBody.constraints = RigidbodyConstraints2D.FreezeRotation | RigidbodyConstraints2D.FreezePositionY;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,10 +80,9 @@ public class Player : MonoBehaviour
|
||||
{
|
||||
if (coll.gameObject.tag == "Pizza")
|
||||
{
|
||||
//Destroy(coll.gameObject);
|
||||
//currentHealth += currentHealth < startHealth ? 1 : 0;
|
||||
//healthBar.size = new Vector2(1.5f * currentHealth, this.healthBar.size.y);
|
||||
Hurt();
|
||||
Destroy(coll.gameObject);
|
||||
currentHealth += currentHealth < startHealth ? 1 : 0;
|
||||
healthBar.size = new Vector2(1.5f * currentHealth, this.healthBar.size.y);
|
||||
}
|
||||
else if (coll.gameObject.tag == "Coffee")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user