Package mindustry.core
Class FileTree
java.lang.Object
mindustry.core.FileTree
- All Implemented Interfaces:
FileHandleResolver
Handles files in a modded context.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
clear()
Clears all mod files.Gets an asset file.Gets an asset file.Loads a music file by name from the music/ folder.Loads a sound by name from the sounds/ folder.
-
Constructor Details
-
FileTree
public FileTree()
-
-
Method Details
-
addFile
-
get
Gets an asset file. -
get
Gets an asset file. -
clear
public void clear()Clears all mod files. -
resolve
- Specified by:
resolve
in interfaceFileHandleResolver
-
loadSound
Loads a sound by name from the sounds/ folder. OGG and MP3 are supported; the extension is automatically added to the end of the file name. Results are cached; consecutive calls to this method with the same name will return the same sound instance. -
loadMusic
Loads a music file by name from the music/ folder. OGG and MP3 are supported; the extension is automatically added to the end of the file name. Results are cached; consecutive calls to this method with the same name will return the same music instance.
-