Esempio n. 1
0
    /*
     * Powered Houses
     * Unpowered Houses
     * Start Random Events
     */

    public void TriggerEvent()
    {
        start = FindObjectOfType <StartUpScript>();


        RunSimulation(BuildFunctions.coalAmount, BuildFunctions.turbineAmount, BuildFunctions.gasAmount, BuildFunctions.solarAmount, StartUpScript.houseAmount);

        //runs some stuff depending on what day it is
        switch (day)
        {
        case 0:
            BuildFunctions.simulationReset = false;
            amountOfHousesUnpowered        = (int)population;
            amountOfHousesPowered          = 0;
            break;

        default:
            simulationSummaryPanel.SetActive(true);
            simulationButton.SetActive(false);

            AdjustPopulation();
            break;
        }

        //incriment day
        day++;

        //resets the house count amount
        BuildFunctions.simulationReset = false;
        amountOfHousesUnpowered        = (int)population;
        amountOfHousesPowered          = 0;
        progressEvents();
    }
Esempio n. 2
0
 void Start()
 {
     UIScript = StartUpUI.GetComponent <StartUpScript>();
 }