コード例 #1
0
        public static int VertexOrder(int x, int y, TileSubLayer layer)
        {
            Vector2Int rotatedCoords = VertexTransfomer.RotateVertex(new Vector2Int(x, y));

            return((rotatedCoords.x + rotatedCoords.y) * 20 + ((int)layer * 2) + 1);
        }
コード例 #2
0
        public static int TileOrder(int x, int y, TileSubLayer layer)
        {
            Vector2Int rotatedCoords = TileTransformer.RotateCoord(new Vector2Int(x, y));

            return((rotatedCoords.x + rotatedCoords.y) * 20 + ((int)layer * 2));
        }
コード例 #3
0
        public static int WallOrder(int x, int y, int z, TileSubLayer layer)
        {
            Vector3Int rotatedCoords = WallTransformer.RotateCoord(new Vector3Int(x, y, z));

            return((rotatedCoords.x + rotatedCoords.y) * 20 + ((int)layer * 2) + 1 - rotatedCoords.z);
        }