In the video is use if to check “hasStarted” is true or false
if (!hasStarted)
{
LockBallToPaddle();
LaunchOnMouseClick();
}
and I just try to use while to change the code like
while(!hasStarted)
{
LockBallToPaddle();
LaunchOnMouseClick();
}
when I click play, unity is just stop work.
I want to ask why while can’t work?
Thanks.