Ejemplo n.º 1
0
    public void endGame()
    {
        enemySpawner.SetActive(false);
        GameMenu.SetActive(false);
        SummaryGUI.SetActive(true);

        //Calculate Level End Reward
        int stars = gameSceneController.getCurrentStar();

        if (stars == 3)
        {
            fm.increaseMoney(1000);
        }
        else if (stars == 2)
        {
            fm.increaseMoney(400);
        }
        else if (stars == 1)
        {
            fm.increaseMoney(250);
        }

        //Persist balance into global
        data.balance = fm.getBalance();
    }
Ejemplo n.º 2
0
    public void endGame()
    {
        enemySpawner.SetActive(false);
        GameMenu.SetActive(false);
        SummaryGUI.SetActive(true);

        //Calculate Level End Reward
        int stars = gameSceneController.getCurrentStar();

        //TODO: [?] Determine if the player should be rewarded with/or without previous star count?

        if (stars == 3)
        {
            fm.increaseMoney(1000);
        }
        else if (stars == 2)
        {
            fm.increaseMoney(400);
        }
        else if (stars == 1)
        {
            fm.increaseMoney(250);
        }

        //Persist balance into global
        data.balance = fm.getBalance();
        //Persist stars into global
        data.LevelStar[level] = stars;
    }