示例#1
0
 public EditMap(Game1 game, ContentManager content, CameraMap camera)
 {
     this.game              = game;
     this.camera            = camera;
     this.tileFactory       = new TileFactory(content);
     this.decorationFactory = new DecorationFactory(content);
     this.pickupFactory     = new PickupFactory(content);
     this.tiles             = new List <List <Tile> >(300);
     for (int index1 = 0; index1 <= 10; ++index1)
     {
         this.tiles.Add(new List <Tile>(300));
         for (int index2 = 0; index2 <= 10; ++index2)
         {
             this.tiles.ElementAt <List <Tile> >(index1).Add(this.tileFactory.GetTile(TileType.Empty, (float)index2, (float)index1, false, false, false, false));
         }
     }
     this.GetEdge();
 }
示例#2
0
 public void Instil(Game1 game, ContentManager content)
 {
     this.game              = game;
     this.content           = content;
     this.tileFactory       = new TileFactory(content);
     this.decorationFactory = new DecorationFactory(content);
     this.pickupFactory     = new PickupFactory(content);
     this.boundaryTile      = this.tileFactory.GetTile(TileType.Metal, 0.0f, 0.0f, false, false, false, false);
     this.Fluff();
     this.particleTiles = new List <Tile>();
     for (int index1 = 0; index1 <= this.TileY; ++index1)
     {
         for (int index2 = 0; index2 <= this.TileX; ++index2)
         {
             Tile tile = this.tiles[index1, index2];
             this.tiles[index1, index2] = this.tileFactory.GetTile(tile.TileType, (float)index2, (float)index1, tile.BorderTop, tile.BorderBottom, tile.BorderLeft, tile.BorderRight);
             if (tile.Decoration != null)
             {
                 this.tiles[index1, index2].SetDecoration(this.decorationFactory.GetDecoration(tile.DecorationType, (float)index2, (float)index1, tile.Decoration.BorderTop, tile.Decoration.BorderBottom, tile.Decoration.BorderLeft, tile.Decoration.BorderRight));
             }
             if (tile.Pickup != null)
             {
                 this.tiles[index1, index2].SetPickup(this.pickupFactory.GetPickup(tile.PickUpType, (float)index2, (float)index1));
             }
             if (this.tiles[index1, index2].Particle != null)
             {
                 this.particleTiles.Add(this.tiles[index1, index2]);
             }
         }
     }
     this.LightEffectsDown();
     this.LightEffectsUp();
     this.LightEffectsRight();
     this.LightEffectsLeft();
     this.GetSpawns();
 }