Created
January 13, 2012 12:09
-
-
Save hughfdjackson/1605798 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void function(){ | |
| var images = {} // where we're keeping our images | |
| function image_callback(i){ | |
| // copy any loaded images over to the images object | |
| for ( var prop in i ) { | |
| images[prop] = i[prop] | |
| } | |
| // DO WHATEVER LOGIC YOU NEED TO DO ONLOAD -- important! it must go here. | |
| } | |
| load_images({ ground: "images/ground.png" }, image_callback) | |
| load_image({ player: "images/player.png", blah: "foo.jpg" }, image_callback) | |
| }() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment