Not sure were i'm missing a } but if anyone can find it that would be great.
thanks and here's the code.
// Update is called once per frame
void Update ()
{
int max = 1000;
int min = 1;
int guess = 500;
min=guess;
guess = (max+min) /2;
if (Input.GetKeyDown(KeyCode.UpArrow)) {
//print("up arrow pressed");
print ("higer or lower than " + guess);
}else if (Input.GetKeyDown(KeyCode.DownArrow)) {
print ("down arrow pressed");
}else if (Input.GetKeyDown(KeyCode.Return)){
print("I won!!");}
}
↧