I have a health script for a game that i am making, and I cannot for the life of me fix errors. This is for a competition set to commence in 10 days. Below is my script (C#), if anyone can help, I would greatly appreciate it!
using UnityEngine;
using System.Collections;
public class EnemyHealth
MonoBehaviour
{
public int maxHealth = 100;
public int curHealth = 100;
// Use this for initialization
void Start ()
{
AddjustCurrentHealth(0);
}
void OnGUI()
{
curHealth + “/” + maxHealth);
}
public void AddjustCurrentHealth(int adj)
{
curHealth += adj; if(curHealth < 0) curHealth = 0;
if(curHealth > maxHealth)
curHealth = maxHealth;
if(maxHealth < 1)
maxHealth = 1;
}
}