Here is the thing. First I’m showing an animation of a rotating cube, then after 4 seconds I display a speech ballon (Gui Label). The balloon should be visible until the user presses the Spacebar. After this another speech ballon is shown. Then again the user needs to press the Spacebar to hide it. In total I show 3 speech ballons and after that is finished I play an animation. Here is the code:
function Intro()
{
yield WaitForSeconds(4);
gameObject.Find("Cubo Text").SendMessage("Show",0); // This calls a function that displays the correct message
while (!Input.GetKey("space")) yield;
gameObject.Find("Cubo Text").SendMessage("Show",1);
while (!Input.GetKey("space")) yield;
gameObject.Find("Cubo Text").SendMessage("Show",2);
while (!Input.GetKey("space")) yield;
gameObject.Find("CuboB").animation.Play("roll");
}
This function is called in Start() . The problem is that I can see the first speech balloon, but after pressing the Spacebar I can’t see any other baloon and the animation starts inmediatly. Any ideas why this happens and how to solve it?