Esempio n. 1
0
    private IEnumerator loadButton(string scene)
    {
        yield return(new WaitForSeconds(EyeCursor.Time()));

        if (EyeCursor.IsFocused())
        {
            EyeCursor.Off();
            if (scene == "MemoryStart")
            {
                MemoryController.ClearResult();
            }
            else if (scene == "DexterityGame")
            {
                MemoryController.ClearResult();
            }
            SceneManager.LoadScene(scene);
        }
    }
Esempio n. 2
0
    void OpenScene(ButtonName name)
    {
        switch (name)
        {
        case ButtonName.Initialize:
            SceneManager.LoadScene("Initialize");
            break;

        case ButtonName.Menu:
            SceneManager.LoadScene("Menu");
            break;

        case ButtonName.MemoryStartMenu:
            SceneManager.LoadScene("MemoryStartMenu");
            break;

        case ButtonName.DexterityStartMenu:
            SceneManager.LoadScene("DexterityStartMenu");
            break;

        case ButtonName.StartMemory:
            MemoryController.ClearResult();
            SceneManager.LoadScene("MemoryStart");
            break;

        case ButtonName.StartDexterity:
            MemoryController.ClearResult();
            SceneManager.LoadScene("DexterityGame");
            break;

        case ButtonName.MathStartMenu:
            SceneManager.LoadScene("MathStartMenu");
            break;

        case ButtonName.StartMath:
            SceneManager.LoadScene("MathGame");
            break;

        default:
            break;
        }
    }