public void loadResources() { // Chargement des ressources manager.LoadMenu(this, this.mEngine); manager.LoadBoardGame(this, this.mEngine); manager.LoadPlayer(this, this.mEngine); manager.LoadHUD(this, this.mEngine); mMenu.Load(); // Charge la musique mMusicLoop = ResourcesManager.getInstance().mMusicLoop; }
@Override public EngineOptions onCreateEngineOptions() { // Singleton instance = this; // Recupere instance manager ressources manager = ResourcesManager.getInstance(); mCamera = new ZoomCamera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT); EngineOptions engineOptions = new EngineOptions( true, ScreenOrientation.LANDSCAPE_FIXED, new FillResolutionPolicy(), mCamera); engineOptions.getAudioOptions().setNeedsSound(true); engineOptions.getAudioOptions().setNeedsMusic(true); return engineOptions; }
@Override public void onCreateResources(OnCreateResourcesCallback pOnCreateResourcesCallback) throws Exception { manager.LoadSplash(this, this.mEngine); Font font = manager.mSplashFont; // Ajout du titre mTitle1 = new Text(0, 0, font, this.getString(R.string.titre1), this.getVertexBufferObjectManager()); mTitle2 = new Text(0, 0, font, this.getString(R.string.titre2), this.getVertexBufferObjectManager()); mTitle1.setPosition(-mTitle1.getWidth(), mCamera.getHeight() - 125); mTitle2.setPosition(mCamera.getWidth(), mCamera.getHeight() - 125); // Ajout de la modification du titre mTitle1.registerEntityModifier( new MoveXModifier(1f, mTitle1.getX(), mCamera.getWidth() / 2 - mTitle1.getWidth() - 18)); mTitle2.registerEntityModifier( new MoveXModifier(1f, mTitle2.getX(), mCamera.getWidth() / 2 - 18)); pOnCreateResourcesCallback.onCreateResourcesFinished(); }