Hey guys…
I can´t realize why this GUI button is not appearing…
I have my game… then, if I lose, I go to a screen asking me if I want to continue… if I dont have continues availables, it declares a static bool true and sends me to the options menu, where I have the store, and I can buy some gold and some continues…
if I buy a continue then, I suposse to have a button asking me, once again, if I want to continue the game… but it never shows up
Here is the code related to that button:
void BuyContinues()
{
if (gold >= 6)
{
gold = gold - 6;
continues = continues + 1;
if (GameOverWithContinuesFunction.continuarNivel == true)
{
GameOverWithContinuesFunction.continuarNivel = false;
_showContinue = true;
ContinueButton();
}
}
else
{
StartCoroutine (FlashLabel());
}
}
void ContinueButton()
{
if (_showContinue == true)
{
Debug.Log("abc");
if (lSel == 1)
{
Debug.Log("aaa");
if (GUI.Button(new Rect(Screen.width * .0f, Screen.height * .7f, Screen.width * .5f, Screen.height * .1f), "CONTINUE?"))
{
continues = continues - 1;
Application.LoadLevel(LS.levelOfGame);
}
}
}
The debugs work, but the button does not… any ideas?
Thanks! (I have also tried placing the code in my OnGUI function, instead of void ContinueButton() and declaring _showContinue as false, with the same results)