Fixed bug of life hearts destroying out of order after scene restart
This commit is contained in:
@@ -68,7 +68,13 @@ public class PlayerScript : MonoBehaviour
|
|||||||
{
|
{
|
||||||
life--;
|
life--;
|
||||||
|
|
||||||
Destroy(GameObject.FindWithTag("Life"));
|
if(life > 0)
|
||||||
|
{
|
||||||
|
Destroy(GameObject.Find("Life ("+life+")"));
|
||||||
|
} else {
|
||||||
|
Destroy(GameObject.Find("Life"));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user