Skip to content

Instantly share code, notes, and snippets.

@zaynyatyi
Last active February 14, 2016 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zaynyatyi/2a4271bfd13d092b5105 to your computer and use it in GitHub Desktop.
Save zaynyatyi/2a4271bfd13d092b5105 to your computer and use it in GitHub Desktop.
@:build(kha.internal.AssetsBuilder.build("image"))
class ImageList {
var images:Map<String, ImageInstance>;
public function new() {
}
}
class ImageInstance {
var image:kha.Image;
var load:Void->Void;
var unload:Void->Void;
}
macro static public function build(type: String): Array<Fields> {
switch (type) {
case "image":
//create map instance here and fill it with ImageInstance objects
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment