コード例 #1
0
ファイル: GameManager.cs プロジェクト: PlasmaDiffusion/Bombs
    //Exit to menu or whatever
    void finishGame()
    {
        ReadAndWriteStats statsManager = GetComponent <ReadAndWriteStats>();

        statsManager.gamesPlayed++;
        statsManager.writeStats();

        //Reset node count

        NodeGenerator.numNodes = 0;

        NodeGenerator.numDepthReached = 0;

        SceneManager.LoadScene("Menu");
    }
コード例 #2
0
    //Exit to menu or whatever
    void finishGame()
    {
        ReadAndWriteStats statsManager = GetComponent <ReadAndWriteStats>();

        statsManager.gamesPlayed++;
        statsManager.writeStats();


        //Send end game message to server
        GameObject networkGameObject = GameObject.Find("ConnectionHandler");

        //Go back to menu if offline. If online, go back to the lobby?
        if (networkGameObject == null)
        {
            SceneManager.LoadScene("Menu");
        }
        else
        {
            //Wait for message to change scene
        }
    }