Exemplo n.º 1
0
 public void DestorySIde(BaseDimension dimension, int xDoor, int yDoor)
 {
     for (var i = 0; i <= 3; i++)
     {
         dimension.Reset(xDoor, yDoor - i);
     }
 }
Exemplo n.º 2
0
        public override List <Item> Destory(int x, int y, BaseDimension dimension, DynamicEntity entity)
        {
            if (Id == 19)
            {
                dimension.Reset(x - 1, y);
            }
            else
            {
                dimension.Reset(x + 1, y);
            }
            List <Item> drop = new List <Item> {
                new Item(1, 26)
            };

            return(drop);
        }
Exemplo n.º 3
0
        public override List <Item> Destory(int x, int y, BaseDimension dimension, DynamicEntity entity)
        {
            if (dimension.MapTile[x, y].IdSubTexture == 0)
            {
                dimension.Reset(x, y - 1);
            }
            else
            {
                dimension.Reset(x, y + 1);
            }
            List <Item> drop = new List <Item> {
                new Item(1, 27)
            };

            return(drop);
        }
Exemplo n.º 4
0
        public override bool UseBlock(int x, int y, BaseDimension dimension, DynamicEntity entity)
        {
            var xDoor  = x;
            var yDoor  = y + (2 - dimension.MapTile[x, y].IdSubTexture);
            int idDoor = dimension.MapTile[xDoor, yDoor].IdTexture;

            for (var j = 0; j < 3; j++)
            {
                dimension.Reset(xDoor, yDoor - j);
            }
            dimension.AddDoor(idDoor, xDoor, yDoor, true);
            return(true);
        }
Exemplo n.º 5
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);
 }
Exemplo n.º 6
0
        public List <Item> Destory(int x, int y, DynamicEntity entity)
        {
            List <Item> dropList = new List <Item>();

            if (IdTexture < _tileMax)
            {
                dropList = _tileListCurrent[IdTexture].Destory(x, y, _dimension, entity);
            }
            _dimension.Reset(x, y);

            if (_dimension.MapTile[x + 1, y + 1].Active)
            {
                _dimension.MapTile[x + 1, y + 1].Update(x + 1, y + 1, entity);
            }
            if (_dimension.MapTile[x + 1, y].Active)
            {
                _dimension.MapTile[x + 1, y].Update(x + 1, y, entity);
            }
            if (_dimension.MapTile[x + 1, y - 1].Active)
            {
                _dimension.MapTile[x + 1, y - 1].Update(x + 1, y - 1, entity);
            }
            if (_dimension.MapTile[x - 1, y + 1].Active)
            {
                _dimension.MapTile[x - 1, y + 1].Update(x - 1, y + 1, entity);
            }
            if (_dimension.MapTile[x - 1, y].Active)
            {
                _dimension.MapTile[x - 1, y].Update(x - 1, y, entity);
            }
            if (_dimension.MapTile[x - 1, y - 1].Active)
            {
                _dimension.MapTile[x - 1, y - 1].Update(x - 1, y - 1, entity);
            }
            if (_dimension.MapTile[x, y + 1].Active)
            {
                _dimension.MapTile[x, y + 1].Update(x, y + 1, entity);
            }
            if (_dimension.MapTile[x, y - 1].Active)
            {
                _dimension.MapTile[x, y - 1].Update(x, y - 1, entity);
            }

            return(dropList);
        }
Exemplo n.º 7
0
        public override bool UseBlock(int x, int y, BaseDimension dimension, DynamicEntity entity)
        {
            var xDoor  = x;
            var yDoor  = y + (2 - dimension.MapTile[x, y].IdSubTexture);
            int iddoor = dimension.MapTile[xDoor, yDoor].IdTexture;

            if (dimension.MapTile[xDoor, yDoor].IdTexture == dimension.MapTile[xDoor - 1, yDoor].IdTexture)
            {
                xDoor -= 1;
            }
            for (var i = 0; i < 2; i++)
            {
                for (var j = 0; j < 3; j++)
                {
                    dimension.Reset(xDoor + i, yDoor - j);
                }
            }
            dimension.AddDoor(iddoor - 1, xDoor, yDoor, false);
            return(true);
        }