MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / loadAssets

Method loadAssets

Source/LoadingLayer.cpp:210–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208
209
210void LoadingLayer::loadAssets() {
211
212 for(auto image : pngs) {
213 GameToolbox::log("image {}", image);
214 _textureCache->addImageAsync(GameToolbox::getTextureString(image), AX_CALLBACK_1(LoadingLayer::assetLoaded, this));
215 }
216
217 for(auto plist : plists) {
218 GameToolbox::log("plist {}", plist);
219 _sprFrameCache->addSpriteFramesWithFile(GameToolbox::getTextureString(plist));
220 this->assetLoaded(nullptr);
221 }
222
223 for(auto fnt : fonts) {
224 GameToolbox::log("font {}", fnt);
225 Label::createWithBMFont(GameToolbox::getTextureString(fnt), "someText");
226 this->assetLoaded(nullptr);
227 }
228
229 loadIcons();
230}
231
232void LoadingLayer::assetLoaded(ax::Object*)
233{

Callers 1

initMethod · 0.95

Calls 2

assetLoadedMethod · 0.95
logFunction · 0.85

Tested by

no test coverage detected