Пример #1
0
 public tile_t(tile t, landfill i)
 {
     tile_p = t;
     landf = i;
 }
Пример #2
0
 public tile_t(tile t)
 {
     tile_p=t;
     landf=null;
 }
Пример #3
0
 public tile_t(string type)
 {
     tile_p = tiles.getTile(type);
     landf=null;
 }
Пример #4
0
 public tile_t(tile_t old)
 {
     landf = old.landf;
     tile_p = old.myTile;
 }
Пример #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");
                }
        }
Пример #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;
        }