예제 #1
0
    public void UpdateMe()
    {
        meter1 = hive.GetAgrressivinesPercentage();
        meter2 = hive.GetPopulationPercentage();
        meter3 = timer.GetHungriness();
        int i = (int)(5 * hive.GetAgrressivinesPercentage());
        int j = (int)(5 * hive.GetPopulationPercentage());
        int k = (int)(5 * timer.GetHungriness());

        if (i > 4)
        {
            i = 4;
        }
        if (j > 4)
        {
            j = 4;
        }
        if (k > 4)
        {
            k = 4;
        }
        textLeft.text   = i.ToString();
        textMiddle.text = j.ToString();
        textRight.text  = k.ToString();
        hand1.UpdateMe(meter1);
        hand2.UpdateMe(meter2);
        hand3.UpdateMe(meter3);
    }
예제 #2
0
 void UpdateDisplay()
 {
     Debug.Log("HUngry" + ((int)(5 * timer.GetHungriness())).ToString() + " " + timer.GetHungriness().ToString());
     Debug.Log("asdasd" + timer.GetHungriness().ToString());
     Debug.Log(foodColors.foodColors[colorSelection.indx].name + "," + foodShapes.foodShapes[shapeSelection.indx].name + "," + foodSpices.foodSpices[spiceSelection.indx].name);
     CorrectFood((int)(5 * hive.GetAgrressivinesPercentage()), (int)(5 * hive.GetPopulationPercentage()), (int)(5 * timer.GetHungriness()));
     shapeImage.color  = foodColors.foodColors[colorSelection.indx].color;
     shapeImage.sprite = foodShapes.foodShapes[shapeSelection.indx].image;
     spiceImage.sprite = foodSpices.foodSpices[spiceSelection.indx].image;
 }