//Draw calls // @Override public void present(float deltaTime) { // GL10 gl = glGraphics.getGL(); //clrscr(gl); //Screen set and now draw calls from native code //drawload(deltaTime); if (Assets.loaderp != 100) { //if(GLGame.adView.isShown()) // ((Activity) TerVel.contex).runOnUiThread(new Runnable(){public void run() {GLGame.adView.setVisibility(View.GONE);}}); //drawload(deltaTime); if (resume != true) { first = true; } } else { //if(NativeFun.setgetstate(-1)==4||NativeFun.setgetstate(-1)==8)//||NativeFun.setgetstate(-1)==4) // ((Activity) TerVel.contex).runOnUiThread(new Runnable(){public void run() {GLGame.adView.setVisibility(View.VISIBLE);}}); //else // ((Activity) TerVel.contex).runOnUiThread(new Runnable(){public void run() {GLGame.adView.setVisibility(View.GONE);}}); if (first) { NativeFun.initEngine(); first = false; } NativeFun.draw(deltaTime); } }
//Resume Call //@Override public void Resume() { if (!resume) { NativeFun.preResume(); } }
//Pause Call //@Override public void pause() { Assets.splashscreen.dispose(); Assets.dispose(); resume = true; Settings.save(); NativeFun.prePause(); }
public static void focusStatee(bool hasFocus) { if (Assets.music == null) { return; } if (Assets.music[0] == null) { return; } if (!hasFocus && isMusicPlaying == true) { Assets.music[0].pause(); isMusicPlaying = false; } else if (hasFocus && isMusicPlaying == false && Settings.musicEnabled == true) { Assets.music[0].resume(); isMusicPlaying = true; } if (!hasFocus) { if (Game.gd.Gamestate == 0) { NativeFun.poststate(3); } if (Main.Intelperceptual != null) { Main.Intelperceptual.dispose(); } // TODO Auto-generated method stub return; } }