Class: AssetManager

Resources.AssetManager

new Resources.AssetManager (assetsDir)

Asset management class
Name Type Description
assetsDir String path to the asset directory

Methods

getAssetDir ()String

gets the assets default directory
Returns:
Type Description
String assets default directory

getAssetPath (name)String

gets the default path for an asset (by file name)
Name Type Description
name String asset file name
Returns:
Type Description
String asset default path

getExtention (name)String

get file extention from it's name/URL.
Name Type Description
name String file name
Returns:
Type Description
String the file extention

getRule (ext)String

gets default path for file extention saved as a rule
Name Type Description
ext String asset file extention
Returns:
Type Description
String default asset directory

setRule (ext, dir)

sets the rule for default asset path (by extention)
Name Type Description
ext String file extention
dir String directory to set default path to.