When clicking Higher or Lower, my number disappears, or just turns black.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class NumberWizard : MonoBehaviour {
int max;
int min;
int guess;
int maxGuesses = 10;
public Text text;
// Use this for initialization
void Start() {
StartGame();
}
void StartGame(){
max = 1000;
min = 1;
guess = 500;
max = max + 1;
}
public void GuessLower() {
max = guess;
NextGuess();
}
public void GuessHigher() {
min = guess;
NextGuess();
}
void NextGuess() {
guess = (max + min) / 2;
text.text = "";
maxGuesses = maxGuesses - 1;
if(maxGuesses <= 0) {
Application.LoadLevel("Win");
}
}
}
not sure what else it could be. The buttons are linked up right. I think.