Example #1
0
    private async Task ShowLevelCleared()
    {
        PopupPanel panel = ((PopupPanel)FindNode("LevelClearedPanel"));
        Label      label = (Label)panel.FindNode("Message");

        if (Global.CurrentLevel < Const.MAX_LEVELS)
        {
            label.Text     = string.Format("Level {0} cleared.\n\nLet's go to\nthe next level!", Global.CurrentLevel);
            timer.WaitTime = 2.0f;
        }
        else
        {
            label.Text     = "Congratulations!\n\nAll levels cleared!!!";
            timer.WaitTime = 5.0f;
        }
        panel.ShowModal();

        timer.OneShot = true;
        var awaiter = ToSignal(timer, "timeout");

        timer.Start();
        await awaiter;

        panel.Hide();
    }
Example #2
0
    public virtual void Hide()
    {
        back.enabled = true;

        if (colisionsButtons != null)
        {
            for (int i = 0; i < colisionsButtons.Length; i++)
            {
                colisionsButtons[i].enabled = true;
            }
        }


        //NO ES AQUI ES EN EL OTRO

        Debug.Log("Selecciono el primero");



        canvas.alpha          = 0;
        canvas.interactable   = false;
        canvas.blocksRaycasts = false;

        if (memoriesPanel != null)
        {
            EventSystem.current.SetSelectedGameObject(lastSelected);
        }

        parentPanel.Hide();
        if (optionCanvas != null)
        {
            optionCanvas.interactable = true;
            EventSystem.current.SetSelectedGameObject(lastSelected);
            panelOption.Show();
        }
    }
Example #3
0
    IEnumerator ClosePopup()
    {
        yield return(new WaitForSeconds(3));

        PopupPanel.Hide();
    }