Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.
/ libld Public archive

a simple asset loader for Children of Ur, works with other projects too!

License

Notifications You must be signed in to change notification settings

ChildrenOfUr/libld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libld

a simple asset loader for Children of Ur, works with other projects too!

Loading a single asset:

Asset textAsset = new Asset('some_text.txt');
assert(textAsset is Asset); // true
// Assets aren't very useful on their own.

assert(textAsset.get() is String); // true 
// However the contents of an Asset can be.

print(textAsset.get()); // prints the text that was in the file.

The ASSET object:

//All assets are stored in a global ASSET object, and indexed by their filename.
assert(Asset['some_text'] is Asset); // true

Loading multiple assets in a Batch:

Batch assetBatch = new Batch([new Asset('url1.txt'), new Asset('url2.txt'), ...]);
assetBatch.load(callback); // Actually loads each asset into memory,
//sending a number between 1-100 to the callback.

About

a simple asset loader for Children of Ur, works with other projects too!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published