Server.TileList.AddRange C# (CSharp) Méthode

AddRange() public méthode

public AddRange ( Server.StaticTile tiles ) : void
tiles Server.StaticTile
Résultat void
		public void AddRange( StaticTile[] tiles )
		{
			if ( (m_Count + tiles.Length) > m_Tiles.Length )
			{
				StaticTile[] old = m_Tiles;
				m_Tiles = new StaticTile[(m_Count + tiles.Length) * 2];

				for ( int i = 0; i < old.Length; ++i )
					m_Tiles[i] = old[i];
			}

			for ( int i = 0; i < tiles.Length; ++i )
				m_Tiles[m_Count++] = tiles[i];
		}

Usage Example

Exemple #1
0
        public Tile[] GetStaticTiles(int x, int y, bool multis)
        {
            if (!multis)
            {
                return(GetStaticTiles(x, y));
            }

            Tile[][][] tiles = GetStaticBlock(x >> 3, y >> 3);

            var eable = m_Owner.GetMultiTilesAt(x, y);

            if (!eable.Any())
            {
                return(Season.PatchTiles(tiles[x & 0x7][y & 0x7], m_Owner.Season));
            }

            foreach (Tile[] multiTiles in eable)
            {
                m_TilesList.AddRange(multiTiles);
            }

            m_TilesList.AddRange(Season.PatchTiles(tiles[x & 0x7][y & 0x7], m_Owner.Season));

            return(m_TilesList.ToArray());
        }
All Usage Examples Of Server.TileList::AddRange