StarsInfoText

This commit is contained in:
brausjonas
2023-02-27 18:06:21 +01:00
parent b00b428c9b
commit 14b4a280b0
19 changed files with 1290 additions and 84 deletions
+8 -1
View File
@@ -16,7 +16,8 @@ public abstract class Player : MonoBehaviour
protected Vector3 cameraOffset = new Vector3(-2.81f, 8.13f, 5.6f);
public int index;
public int coins = 0;
public TMP_Text textCoinsInfo;
public int stars = 0;
public TMP_Text textCoinsInfo, textStarsInfo;
protected bool eventstop = false;
public UIHandler uiHandler;
@@ -53,6 +54,12 @@ public abstract class Player : MonoBehaviour
Coin
}
public void AddStars(int amount)
{
stars += amount;
textStarsInfo.text = stars + "";
}
public void AddCoins(int amount)
{
coins += amount;