Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // THIS IS THE SCRIPT FOR THE HUD OF THE GAMEOBJECT.
- //ATTACH THIS TO YOUR GAMEOBJECT YOU WANT AS A HUD.
- using UnityEngine;
- using System.Collections;
- public class Health1 : MonoBehaviour {
- // Access Health Script
- public BasicHealth healthScript;
- // Use this for initialization
- void Start () {
- }
- // Update is called once per frame
- void Update () {
- // If health is lower than this Then, disable Mesh Renderer.
- if (healthScript.curHealth <= 9) {
- renderer.enabled = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement