Created
December 23, 2019 09:13
-
-
Save IshidaGames/711cea4d549fe6c5afd13cd0047992f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class DefeatCount : MonoBehaviour | |
{ | |
public Text text; | |
private int count = 0; | |
private int monster = 0; | |
void Awake() | |
{ | |
text.text = count.ToString() + " / " + monster.ToString(); | |
} | |
void Update() | |
{ | |
text.text = count.ToString() + " / " + monster.ToString(); | |
} | |
public void AddCount() | |
{ | |
count += 1; | |
} | |
public void AddMonsterCount() | |
{ | |
monster += 1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment