Exemplo n.º 1
0
    public void resolveTurn()
    {
        // CHECK GAME OVER

        if (currentTurn > 3)
        {
            turnsSinceEvt++;
            if (randomBool((float)(turnsSinceEvt * 0.1)))
            {
                amtofEvts++;
                um.EventActivate();


                EVENT_RNG temp = (EVENT_RNG)UnityEngine.Random.Range(0, (int)EVENT_RNG.QUAKE);

                if (temp == EVENT_RNG.RAIN && currentTiles.Count > 40)
                {
                    temp = EVENT_RNG.QUAKE;
                }                 // change this to "earthquake"

                um.evnt.EVTChoice(temp);
                turnsSinceEvt = 0;
            }
            else
            {
                finishTurn();
            }
        }
        else
        {
            finishTurn();
        }
    }
Exemplo n.º 2
0
    public void EVTChoice(EVENT_RNG type)
    {
        switch (type)
        {
        case EVENT_RNG.PERMITS:
            rngText[0].text = "Forgotten Permits";
            rngText[1].text = "Government extending all building times in the area.";
            GameManager.instance.permits();

            break;

        case EVENT_RNG.RAIN:
            rngText[0].text = "Heavy Rains";
            rngText[1].text = "Citizens be wary, flooding spotted in the area.";
            GameManager.instance.flooding();
            // TURN ON RAIN;
            break;

        case EVENT_RNG.CRIMEWAVE:
            rngText[0].text = "Crime Wave";
            rngText[1].text = "Shops closing up amid all the crime and chaos.";
            GameManager.instance.crimeWave();

            // PLAY SOUND
            break;

        case EVENT_RNG.BEDBUGS:
            rngText[0].text = "Bed Bugs";
            rngText[1].text = "Infestation causing citizens to move away";
            GameManager.instance.bedbugs();
            break;

        case EVENT_RNG.QUAKE:
            rngText[0].text = "EARTHQUAKE!";
            rngText[1].text = "Natural disaste destroys multiple buildings in the area.";
            GameManager.instance.earthquake();
            break;

        case EVENT_RNG.MONEYTROUBLES:
            rngText[0].text = "Economy Troubles";
            rngText[1].text = "One fifth of our minerals have to be exported to cover funding.";
            GameManager.instance.economy();
            break;
        }
    }