Ejemplo n.º 1
0
    public void startNewGame()
    {
        dm.writeDataResetToFile();
        dm.writePortResetToFile();

        SceneManager.LoadScene("sceneMap", LoadSceneMode.Single);
    }
Ejemplo n.º 2
0
    public void clickEndButton()
    {
        //If you dont have money then it takes you back to the main scene and resets the game save
        dm.writeDataResetToFile();
        dm.writePortResetToFile();
        dm.writeMarketForcesResetToFile();

        SceneManager.LoadScene("sceneMain", LoadSceneMode.Single);
    }
Ejemplo n.º 3
0
    //If the data is screwed up then you can reset it
    public void resetAllData()
    {
        dm.writeDataResetToFile();
        dm.writePortResetToFile();
        dm.writeMarketForcesResetToFile();

        //update the input fields
        gameData.text = dm.returnWholeGameData();
        portData.text = dm.returnWholePorts();
    }
Ejemplo n.º 4
0
    public void closeAlert()
    {
        //If they still have money
        if (Int32.Parse(gameData[0]) > 0)
        {
            alertPanel.SetActive(false);
        }
        else
        {
            //If you dont have money then it takes you back to the main scene and resets the game save
            dm.writeDataResetToFile();
            dm.writePortResetToFile();
            dm.writeMarketForcesResetToFile();

            SceneManager.LoadScene("sceneMain", LoadSceneMode.Single);
        }
    }