Пример #1
0
        public void AddAgentsCount(List <Agent> allAgents, int currentIteration)
        {
            var herbivirous = allAgents.Where(a => a.AgentType == AgentTypes.Herbivorous).Count();
            var predators   = allAgents.Where(a => a.AgentType == AgentTypes.Predator).Count();

            HerbivirousCount.Add(currentIteration, herbivirous);
            PredatorCount.Add(currentIteration, predators);
        }
Пример #2
0
    // Start is called before the first frame update
    void Start()
    {
        selfFlash = GetComponent <WhiteFlash>();

        if (GameObject.FindWithTag("PredatorSpawner"))
        {
            predatorCount = GameObject.FindWithTag("PredatorSpawner").GetComponent <PredatorCount>();
            if (!boss)
            {
                predatorCount.IncCount();
            }
        }
    }