Beispiel #1
0
    public void SetWorld(TerrainTile[,] terrainTiles, List <Vector2> initial_herbivores, List <Vector2> initial_carnivores, int size_factor_in)
    {
        size_factor   = size_factor_in;
        world         = terrainTiles;
        sprite_offset = new Vector2(world.GetLength(0) / 2, world.GetLength(1) / 2);
        for (int i = 0; i < initial_herbivores.Count; i++)
        {
            herbies.Add(Herbivore.CreateBasicHerb(initial_herbivores[i], sprite_offset, HerbSprite, this.transform));
        }

        for (int i = 0; i < initial_carnivores.Count; i++)
        {
            carnies.Add(Carnivore.CreateBasicCarnivore(initial_carnivores[i], sprite_offset, CarnSprite, this.transform));
        }
    }