예제 #1
0
        public int[] GetMetaTableArray(int index)
        {
            if (index == -1)
            {
                return(null);
            }

            return(Enumerable.Range(0, IndicesCache.GetLength(1))
                   .Select(x => IndicesCache[index, x])
                   .ToArray());
        }
예제 #2
0
        // First number is: Meta table index
        // Second number is: Selected index inside the meta table
        public (int, int) GetAttributeTileIndex(int index)
        {
            for (int i = 0; i < IndicesCache.GetLength(0); ++i)
            {
                for (int j = 0; j < IndicesCache.GetLength(1); ++j)
                {
                    int value = IndicesCache[i, j];

                    if (value == index)
                    {
                        return(i, j);
                    }
                }
            }

            return(-1, -1);
        }