No Pixel Coins

This commit is contained in:
brausjonas
2023-02-05 23:16:59 +01:00
parent 97b40f49e0
commit b935aa2871
8 changed files with 13 additions and 9 deletions
@@ -54,6 +54,10 @@ public abstract class Player : MonoBehaviour
protected void AddCoins(int amount)
{
coins += amount;
if (coins < 0)
{
coins = 0;
}
textCoinsInfo.text = coins + "";
PlayAnimation(AnimationType.Coin);
}