Exemple #1
0
    private void Start()
    {
        //Set References
        quitGame          = GetComponent <QuitGame> ();
        instructionScreen = GetComponent <SwitchInstructionsScreen> ();
        loadGame          = GetComponent <LoadGame> ();

        //Button onclick listeners
        play.onClick.AddListener(delegate(){ loadGame.LoadScene(); });
        instruction.onClick.AddListener(delegate(){ instructionScreen.OpenScreen(); });
        quit.onClick.AddListener(delegate(){ quitGame.Quit(); });
        back.onClick.AddListener(delegate(){ instructionScreen.CloseScreen(); });
    }
Exemple #2
0
    void LoadSong()
    {
        if (midiPath == "")
        {
            Debug.LogError("No song is mapped to that button");
            return;
        }
        else if (!File.Exists(midiPath))
        {
            Debug.LogError("Song does not exist");
            return;
        }

        LoadGame.setSongPath(midiPath);
        LoadGame.LoadScene("Orchestra/Main Scene");
    }