MapLoader

object MapLoader

This object contains utility functions for loading the map content from the assets folder of the application. It contains a single function that is responsible for loading the map content from a JSON file. The function takes the context of the application and the name of the JSON file as parameters and returns the JSON file as a string. If the file is not found, the function returns null.

Functions

Link copied to clipboard
fun loadMapFromAsset(context: Context, fileName: String): MapBuild?

This function is responsible for loading the Map content from Json file that is located the assets folder of the application. it takes the context of the application and the name of the JSON file as parameters. then it reads the JSON file and returns it as a string.