Last active
February 9, 2016 03:19
-
-
Save moon-goon/8016bfd0152b29083cb9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 UnityEngine; | |
using UnityEngine.UI; | |
public class score_manager : MonoBehaviour { | |
public Text txtScore; | |
private int myScore; | |
void Start () { | |
myScore = 0; | |
} | |
void scoreUpdate() { | |
txtScore.text = "SCORE : " + myScore; | |
} | |
public void addScore(int newScore) { | |
myScore += newScore; | |
scoreUpdate(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment