Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var textMesh:TextMesh;
- var health = 0;
- var healthkeeper : HealthKeeper;
- function Start (){
- healthkeeper = GameObject.FindObjectOfType(HealthKeeper);
- }
- function Awake () {
- textMesh = GetComponent(TextMesh);
- }
- function AddToHealth(){
- ++health;
- textMesh.text = "" + health;
- }
- function SubtractHelath(){
- --health;
- textMesh.text = "" + health;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement