Skip to content

Instantly share code, notes, and snippets.

@IshidaGames
Created December 23, 2019 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IshidaGames/711cea4d549fe6c5afd13cd0047992f5 to your computer and use it in GitHub Desktop.
Save IshidaGames/711cea4d549fe6c5afd13cd0047992f5 to your computer and use it in GitHub Desktop.
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