Revive text!
This commit is contained in:
parent
b61de5cd28
commit
7a33995eb3
|
@ -3455,6 +3455,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
ReviveParticleSystem: {fileID: 1678451168}
|
ReviveParticleSystem: {fileID: 1678451168}
|
||||||
|
ReviveText: {fileID: 730370596}
|
||||||
--- !u!4 &1566837129 stripped
|
--- !u!4 &1566837129 stripped
|
||||||
Transform:
|
Transform:
|
||||||
m_CorrespondingSourceObject: {fileID: 3032075919872812610, guid: ec5007446d8bbca48bf02b3a7e752da1, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3032075919872812610, guid: ec5007446d8bbca48bf02b3a7e752da1, type: 3}
|
||||||
|
|
|
@ -17,6 +17,8 @@ public class GameManager : MonoBehaviour
|
||||||
|
|
||||||
public GameObject ReviveParticleSystem;
|
public GameObject ReviveParticleSystem;
|
||||||
|
|
||||||
|
public TMPro.TextMeshProUGUI ReviveText;
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
if (Instance == null)
|
if (Instance == null)
|
||||||
|
@ -24,6 +26,7 @@ public class GameManager : MonoBehaviour
|
||||||
Instance = this;
|
Instance = this;
|
||||||
DontDestroyOnLoad(gameObject);
|
DontDestroyOnLoad(gameObject);
|
||||||
Revives = 1;
|
Revives = 1;
|
||||||
|
ReviveText.text = Revives + "x";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -46,6 +49,7 @@ public class GameManager : MonoBehaviour
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Revives--;
|
Revives--;
|
||||||
|
ReviveText.text = Revives + "x";
|
||||||
Collider2D[] d = Physics2D.OverlapCircleAll(who.transform.position, 3f);
|
Collider2D[] d = Physics2D.OverlapCircleAll(who.transform.position, 3f);
|
||||||
|
|
||||||
Debug.Log(d);
|
Debug.Log(d);
|
||||||
|
@ -72,8 +76,10 @@ public class GameManager : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddRevive() {
|
public void AddRevive()
|
||||||
|
{
|
||||||
Revives++;
|
Revives++;
|
||||||
|
ReviveText.text = Revives + "x";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTime(string t)
|
public void setTime(string t)
|
||||||
|
|
Loading…
Reference in New Issue