Revive text!

This commit is contained in:
SpoodyTheOne 2024-02-04 11:35:13 +01:00
parent b61de5cd28
commit 7a33995eb3
2 changed files with 8 additions and 1 deletions

View File

@ -3455,6 +3455,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
ReviveParticleSystem: {fileID: 1678451168}
ReviveText: {fileID: 730370596}
--- !u!4 &1566837129 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3032075919872812610, guid: ec5007446d8bbca48bf02b3a7e752da1, type: 3}

View File

@ -17,6 +17,8 @@ public class GameManager : MonoBehaviour
public GameObject ReviveParticleSystem;
public TMPro.TextMeshProUGUI ReviveText;
void Awake()
{
if (Instance == null)
@ -24,6 +26,7 @@ public class GameManager : MonoBehaviour
Instance = this;
DontDestroyOnLoad(gameObject);
Revives = 1;
ReviveText.text = Revives + "x";
}
else
{
@ -46,6 +49,7 @@ public class GameManager : MonoBehaviour
else
{
Revives--;
ReviveText.text = Revives + "x";
Collider2D[] d = Physics2D.OverlapCircleAll(who.transform.position, 3f);
Debug.Log(d);
@ -72,8 +76,10 @@ public class GameManager : MonoBehaviour
}
}
public void AddRevive() {
public void AddRevive()
{
Revives++;
ReviveText.text = Revives + "x";
}
public void setTime(string t)