Пример #1
0
    private void ResetWorld()
    {
        //We erase the world
        world.EraseWorld();
        poblation.ErasePoblation();

        //We re-create the world
        world.SetWorldSize(Random.Range(3, 18), Random.Range(3, 18));
        world.CreateWorld();

        for (int i = 0; i < Random.Range(1, 10); i++)
        {
            poblation.CreateIndividual(world.GetRandomWalkableTile(), world.Width, world.Height);
        }

        food.EraseFood();

        ConfigCamera();

        CancelInvoke();
        InvokeRepeating("IncreaseHunger", 0.5f, 1.0f);
    }