Ejemplo n.º 1
0
 public tile_t(tile t, landfill i)
 {
     tile_p = t;
     landf = i;
 }
Ejemplo n.º 2
0
 public tile_t(tile t)
 {
     tile_p=t;
     landf=null;
 }
Ejemplo n.º 3
0
 public tile_t(string type)
 {
     tile_p = tiles.getTile(type);
     landf=null;
 }
Ejemplo n.º 4
0
 public tile_t(tile_t old)
 {
     landf = old.landf;
     tile_p = old.myTile;
 }
Ejemplo n.º 5
0
        static void removeLandfill(landfill l)
        {
            landfills.Remove(l);
            Rectangle r = l.area();
            for(int x=r.Left;x<r.Right;x++)
                for(int y=r.Top;y<r.Bottom;y++)
                {

                    m[x,y].landf=null;
                    m[x,y].myTile = tiles.getTile("dir");
                }
        }
Ejemplo n.º 6
0
        public void addLandfill(int x, int y, int owner, int width, int height)
        {
            if(!isInBounds(x+1,y+1)) return;
            landfill l = new landfill(owner, x+1, y+1, width, height);

            landfills.Add(l);

            m[x,y].myTile = ((tile)tiles.getTile("lfNW"));
            m[x+1,y].myTile = ((tile)tiles.getTile("lfNE"));
            m[x,y+1].myTile = ((tile)tiles.getTile("lfSW"));
            m[x+1,y+1].myTile = ((tile)tiles.getTile("lfSE"));

            m[x,y].landf = l;
            m[x+1,y].landf = l;
            m[x,y+1].landf = l;
            m[x+1,y+1].landf = l;

            selected.X = x+1;
            selected.Y = y+1;
        }