예제 #1
0
    private void CommitDecisionsDay()
    {
        needText = false;
        //execute decisions simultaneously
        for (int i = 0; i < opponentList.Count; ++i)
        {
            VillageScript opponentScript = opponentList [i].GetComponent <VillageScript> ();
            opponentScript.swapProbabilities();
            int randomInt = Random.Range(0, 100);
            //Debug.Log(opponentScript.GetNextDecisionProbability () + " | " + randomInt);
            if (opponentScript.GetCurrentDecisionProbability() > randomInt)
            {
                opponentScript.VillageCollectsWater();
                if (myPlayerVillageScript.GetPlayerVisit())
                {
                    needText  = true;
                    tempText += "\t-" + opponentScript.GetName() + "\n";
                }
            }
        }



        if (!needText)
        {
            tempText = "";
        }
    }