Beispiel #1
0
    public void startPlantsInParallel(string climate)
    {
        PlantAnimation animation = GameObject.Find("Terrain").GetComponent <PlantAnimation>();

        animation.PlantsInParallel(climate);
        //animation.countPixels();
    }
Beispiel #2
0
    public void pauseSimulation()
    {
        PlantAnimation animation = GameObject.Find("Terrain").GetComponent <PlantAnimation>();

        if (!paused)
        {
            paused = true;
            if (animation.type == "PlantsInParallel")
            {
                animation.plantsInParallel = false;
            }
            else if (animation.type == "ClimateInParallel")
            {
                animation.climateInParallel = false;
            }
            else
            {
                animation.bothInParallel = false;
            }
        }
        else
        {
            //game is paused and we want to start it again
            paused = false;
            if (animation.type == "PlantsInParallel")
            {
                animation.plantsInParallel = true;
            }
            else if (animation.type == "ClimateInParallel")
            {
                animation.climateInParallel = true;
            }
            else
            {
                animation.bothInParallel = true;
            }
        }
    }
Beispiel #3
0
    public void startBothInParallel()
    {
        PlantAnimation animation = GameObject.Find("Terrain").GetComponent <PlantAnimation>();

        animation.BothInParallel();
    }
Beispiel #4
0
    public void startClimateInParallel(string species)
    {
        PlantAnimation animation = GameObject.Find("Terrain").GetComponent <PlantAnimation>();

        animation.ClimateInParallel(species);
    }