Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class ScoreController : MonoBehaviour
- {
- private int score
- void Awake ()
- {
- score = 0;
- }
- void OnGUI ()
- GUI.Label(10, 10, 100, 20), "Score: " + score);
- }
- public void AddScore (newScoreValue)
- {
- score += newScoreValue;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement