Exemple #1
0
        public StaticTile[] GetStaticTiles(int x, int y, bool multis)
        {
            StaticTile[][][] tiles = GetStaticBlock(x >> 3, y >> 3);

            if (!multis)
            {
                return(tiles[x & 0x7][y & 0x7]);
            }

            IPooledEnumerable <StaticTile[]> eable = m_Owner.GetMultiTilesAt(x, y);

            if (eable == Map.NullEnumerable <StaticTile[]> .Instance)
            {
                return(tiles[x & 0x7][y & 0x7]);
            }

            bool any = false;

            m_TilesList.AddRange(eable.SelectMany(t => { any = true; return(t); }).ToArray());

            eable.Free();

            if (!any)
            {
                return(tiles[x & 0x7][y & 0x7]);
            }

            m_TilesList.AddRange(tiles[x & 0x7][y & 0x7]);

            return(m_TilesList.ToArray());
        }