Added Swigs left gui text.

This commit is contained in:
shakurass 2014-04-26 20:59:09 -06:00
commit d4a6d0bb00
10 changed files with 153 additions and 128 deletions

View file

@ -0,0 +1,27 @@
using UnityEngine;
using System.Collections;
public class GameController : MonoBehaviour {
public int swigs;
public GUIText swigText;
// Use this for initialization
void Start () {
UpdateSwigText ();
}
// Update is called once per frame
void Update () {
}
public void TakeSwig() {
swigs -= 1;
UpdateSwigText();
}
void UpdateSwigText() {
swigText.text = "Swigs Left: " + swigs;
}
}