// Use this for initialization void Start() { freeze = new bool[8]; freezetimer = new float[8]; for (int i=1;i<=7;i++) //initialize freeze modifier { freeze[i] = false; freezetimer[i] = 0; } poisontimer = new float[151]; for (int i = 1; i <= 150; i++) //initialize poison modifier { poisontimer[i] = 0; } poisonpointer = 0; //health = 80; pathnum = 1; speed = 0.1F; startTime = Time.time; c2 = GameObject.Find("avatar").GetComponent<maincharacontrol>(); gbar = transform.Find("gbar").gameObject; hbar = transform.Find("healthbar").gameObject; deathflag = true; }
// Use this for initialization void Start() { wholehealth = 20; life.text = "Your health: "+wholehealth.ToString(); c2 = GameObject.Find("avatar").GetComponent<maincharacontrol>(); }