Advertisement
LittleAngel

Score Controller

Oct 2nd, 2013
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class ScoreController : MonoBehaviour
  5. {
  6.     private int score
  7.  
  8.     void Awake ()
  9.     {
  10.         score = 0;
  11.     }
  12.    
  13.     void  OnGUI ()
  14.         GUI.Label(10, 10, 100, 20), "Score: " + score);
  15.     }
  16.  
  17.     public void AddScore (newScoreValue)
  18.     {
  19.         score += newScoreValue;
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement