Instantly share code, notes, and snippets.

Embed
What would you like to do?
A class to embed all external assets into a GBs game to make it self contained.
package
{
import com.pblabs.engine.resource.ResourceBundle;
public class EmbeddedResources extends ResourceBundle
{
[Embed(source="levels/GlobalsDescriptor.xml", mimeType="application/octet-stream")]
public var globalData : Class;
[Embed(source="levels/LevelsDescriptor.xml", mimeType="application/octet-stream")]
public var levelDescriptor : Class;
//Add All levels below
[Embed(source="levels/level0.pbelevel", mimeType="application/octet-stream")]
public var level0 : Class;
public function EmbeddedResources()
{
super();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment