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

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

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

                bool any = false;

                foreach (StaticTile[] multiTiles in eable)
                {
                    if (!any)
                    {
                        any = true;
                    }

                    m_TilesList.AddRange(multiTiles);
                }

                eable.Free();

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

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

                return(m_TilesList.ToArray());
            }
            else
            {
                return(tiles[x & 0x7][y & 0x7]);
            }
        }