void LoadingScene::preloadImages() { TextureCache* textureCache = Director::getInstance()->getTextureCache(); textureCache->addImageAsync(BACKGROUND_IMAGE_GAME, CC_CALLBACK_1(LoadingScene::onAssetPreloaded, this)); textureCache->addImageAsync(BACKGROUND_IMAGE_MAIN_MENU, CC_CALLBACK_1(LoadingScene::onAssetPreloaded, this)); textureCache->addImageAsync(SPRITE_ENEMY_SPACESHIP, CC_CALLBACK_1(LoadingScene::onAssetPreloaded, this)); textureCache->addImageAsync(SPRITE_PLAYER_SPACESHIP, CC_CALLBACK_1(LoadingScene::onAssetPreloaded, this)); textureCache->addImageAsync(PLANET_TEXTURE_MARS, CC_CALLBACK_1(LoadingScene::onAssetPreloaded, this)); }