//arg : direction
    private void Pop(Direction d)
    {
        switch (d)
        {
        case Direction.FRONT:
            foreach (Landscape land in map.First.Value)
            {
                LandscapeTrash.Destroy(land);
            }
            map.RemoveFirst();
            break;

        case Direction.BACK:
            foreach (Landscape land in map.Last.Value)
            {
                LandscapeTrash.Destroy(land);
            }
            map.RemoveLast();
            break;

        case Direction.LEFT:
            foreach (LinkedList <Landscape> line in map)
            {
                LandscapeTrash.Destroy(line.First.Value);
                line.RemoveFirst();
            }
            break;

        case Direction.RIGHT:
            foreach (LinkedList <Landscape> line in map)
            {
                LandscapeTrash.Destroy(line.Last.Value);
                line.RemoveLast();
            }
            break;
        }
    }
Example #2
0
 void Update()
 {
     UpdateMap();
     UpdateLODs();
     LandscapeTrash.Flush();
 }