Пример #1
0
 public override bool BlockAdded(BaseDimension dimension, int x, int y)
 {
     if (dimension.MapTile[x, y - 1].Active)
     {
         return(false);
     }
     dimension.SetTexture(x, y - 1, Id, 1); return(true);
 }
Пример #2
0
 public override void Spawn(BaseDimension dimension)
 {
     for (var i = 0; i < 2; i++)
     {
         for (var j = 0; j < 2; j++)
         {
             dimension.SetTexture(X + i, j + Y, 35);
         }
     }
 }
Пример #3
0
 public void Destory(BaseDimension dimension)
 {
     Program.Game.AddExplosion(Position);
     if (TypeBullet == 1)
     {
         dimension.SetTexture((
                                  int)Math.Floor(OldPosition.X / Tile.TILE_MAX_SIZE),
                              (int)Math.Floor(OldPosition.Y / Tile.TILE_MAX_SIZE), 1);
     }
 }
Пример #4
0
 public override void Spawn(BaseDimension dimension)
 {
     for (var i = 0; i < SIZEX; i++)
     {
         if (X + i + 1 >= SizeGeneratior.WorldWidth)
         {
             continue;
         }
         for (var j = 0; j < SIZEY; j++)
         {
             if (j != 0 || Math.Abs(Y - j - dimension.MapHeight[X + i + 1]) < 1)
             {
                 dimension.Reset(X + i, Y - j);
             }
         }
     }
     for (var i = -5; i < 5; i++)
     {
         for (var j = -5; j < 5; j++)
         {
             if (Tools.InRadious(X + 5 + i, Y + 5 + j, X + 5, Y + 5, 5 - 1, true))
             {
                 dimension.SetTexture(X + 5 + i, Y - 5 + j, 12);
             }
         }
     }
     dimension.MapTile[X + SIZEX / 2, Y - SIZEY / 2].IdPoster = 0;
     for (var i = 0; i < SIZEX - 1; i++)
     {
         for (var j = 1; j < SIZEY - 1; j++)
         {
             dimension.MapTile[X + i, Y - j].IdWall = 9;
         }
     }
     for (var i = 0; i < SIZEX; i++)
     {
         dimension.SetTexture(X + i, Y, 9);
         dimension.SetTexture(X + i, Y - (SIZEY - 1), 9);
     }
     for (var j = 4; j < SIZEY; j++)
     {
         dimension.SetTexture(X, Y - j, 9);
         dimension.SetTexture(X + (SIZEX - 1), Y - j, 9);
     }
     if (!Isplaying)
     {
         dimension.Zombies.Add(new Boss(new Vector2((X + 2) * Tile.TILE_MAX_SIZE, (Y - 10) * Tile.TILE_MAX_SIZE)));
     }
     dimension.SetTexture(X + 1, Y - (SIZEY - 2), 6);
     dimension.SetTexture(X + (SIZEX - 2), Y - (SIZEY - 2), 6);
 }
Пример #5
0
        public void AddTexture(int newX, int newY, BaseDimension dimension)
        {
            if (newX < 0 || newX >= SizeGeneratior.WorldWidth)
            {
                return;
            }
            if (dimension.MapTile[newX, newY].Active)
            {
                return;
            }
            if (!dimension.MapTile[newX, newY + 1].IsSolid())
            {
                return;
            }

            dimension.SetTexture(newX, newY, Id);
        }