I'm trying to make it so that when my static ball8 gets hit by a moving ball(ball), and the count is greater than or equal to 40, a yellow wall changes to red.
For some reason I get the error with && countText.text >= "40"..... but if I put && countText.text == "40", then everything is fine. Its just the '>' that messes everything up.
Any help would be appreciated. Thanks!
if (ballCollideBall8.gameObject.tag == "ball" && countText.text >= "40")
{
//Ball8.SetActive (false);
LeftYellowSideWall.GetComponent ().ColorChangeRed1();
Ball8.GetComponent().enabled = false;
Ball8.GetComponent ().enabled = false;
ball8Green = false;
}
}
↧