Created
April 8, 2015 15:28
-
-
Save rezoner/aa895ca1d3212d732b2c 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
var app = new PLAYGROUND.Application({ | |
preload: function() { | |
/* this is called before create and lets you silently load some assets */ | |
this.loadData("objects/buildings", "objects/subObjects", "objects/townBuildingList"); | |
}, | |
create: function() { | |
/* this is called when preloader has finished */ | |
var buildings = this.data["objects/buildings"]; | |
for (var i = 0, len = buildings.length; i < len; i++) { | |
var building = building[i]; | |
this.loadImages(building.imagePath + building.fileExtension); | |
} | |
}, | |
ready: function() { | |
/* this is called when loader has finished */ | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment