public void createSplashScene(IGameInterface.OnCreateSceneCallback onCreateSceneCallback) { resourceManagerMap.get(SceneType.SPLASH).loadResources(); splashScene = new SplashScene(resourceManagerMap.get(SceneType.SPLASH)); splashScene.createScene(); currentScene = splashScene; onCreateSceneCallback.onCreateSceneFinished(splashScene); }
public void createMainMenuScene() { final MainMenuResourcesManager menuResourcesManager = (MainMenuResourcesManager) resourceManagerMap.get(SceneType.MENU); final IResourcesManager loadingResourcesManger = resourceManagerMap.get(SceneType.LOADING); menuResourcesManager.loadResources(); menuResourcesManager.loadFonts(); loadingResourcesManger.loadResources(); menuScene = new MainMenuScene(menuResourcesManager); menuScene.createScene(); loadingScene = new LoadingScene(loadingResourcesManger); loadingScene.createScene(); setScene(menuScene); disposeSplashScene(); showAppRating(); }
public void loadMenuScene(BaseScene scene) { Log.i(TAG, ">> Loading menu scene"); setScene(loadingScene); scene.disposeScene(); engine.registerUpdateHandler( new TimerHandler( ContextConstants.LOADING_SCENE_TIME, new ITimerCallback() { @Override public void onTimePassed(TimerHandler pTimerHandler) { engine.unregisterUpdateHandler(pTimerHandler); resourceManagerMap.get(SceneType.MENU).loadResources(); setScene(menuScene); Log.i(TAG, "<< Loading menu scene finished"); } })); }
private void disposeSplashScene() { splashScene.disposeScene(); splashScene = null; }