An interface for loading and unloading packages (groups of resources that you define in data files with the .package extension).
Constructors and accessors
stingray.Application.resource_package() stingray.Application.resource_package_from_url() stingray.Mod.resource_package() |
Related sample code
Other related reference items
Related help topics
flush ( self )Brings the resources in the package online.
|
self : | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. |
This function does not return any values. |
If the package has not been fully loaded, this call blocks the game until the package gets loaded. Therefore, you may want to first test that the package has been loaded into memory by calling has_loaded().
has_loaded ( self ) : booleanIndicates whether or not the background thread has completed loading the package.
|
self : | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. |
boolean |
Returns true if the package has been fully loaded. |
Other related reference items
load ( self )Starts loading the specified package in the background.
|
self : | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. |
This function does not return any values. |
unload ( self )Unloads the resources in the specified package.
|
self : | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. |
This function does not return any values. |
You must make sure that the resources are no longer in use in the game before unloading them.