For more information about how to create a configuration, see the preceding section.
If (! CCDirector: sharedDirector ()-> getOpenGLView () {CCEGLView * view = & CCEGLView: Export dopenglview (); view-> setFrameSize (w, h ); // set the design resolution screen size, if you want to use Design Resoulution scaled to current screen, please uncomment next line. view-> setDesignResolutionSize (480,800); // Add this statement to adapt to the screen AppDelegate * pAppDelegate = new AppDelegate (); CCApplication: sharedApplication (). run ();}
LOCAL_SRC_FILES := helloworld/main.cpp \ ../../Classes/AppDelegate.cpp \ ../../Classes/BulletLayer.cpp \ ../../Classes/ControlLayer.cpp \ ../../Classes/Enemy1Layer.cpp \ ../../Classes/Enemy2Layer.cpp \ ../../Classes/Enemy3Layer.cpp \ ../../Classes/GameLayer.cpp \ ../../Classes/GameScene.cpp \ ../../Classes/PlaneLayer.cpp \ ../../Classes/WelcomeLayer.cpp \ ../../Classes/WelcomeScene.cpp \ ../../Classes/Enemy1Sprite.cpp \ ../../Classes/Enemy2Sprite.cpp \ ../../Classes/Enemy3Sprite.cpp \ ../../Classes/UFOLayer.cpp \ ../../Classes/GameOverLayer.cpp \ ../../Classes/GameOverScene.cpp \ ../../Classes/MutiBulletsLayer.cpp
public class JackyAirplane extends Cocos2dxActivity
public class Cocos2dxActivity extends Activity
Runnable runnable = new Runnable () {@ Overridepublic void run () {// TODO Auto-generated method stubIntent intent = new Intent (LoadActivity. this, JackyAirplane. class); LoadActivity. this. startActivity (intent); // switch ActivityLoadActivity. this. finish ();}};
Public class JackyAirplane extends Cocos2dxActivity {... public static AdView adView; // 3rd-party Advertisement}
public static void showAD() { new Thread(new Runnable(){ @Override public void run() { adView.setVisibility( adView.VISIBLE ); } }).start();}
# Include <jni/JniHelper. h> JniMethodInfo minfo; jobject jobj; bool B = JniHelper: getStaticMethodInfo (minfo, "com/jacky/jackyAirplane/JackyAirplane", // class path "showAD ", // static method name "() V"); // parameters in brackets, followed by the returned value if (B) jobj = minfo. env-> CallStaticObjectMethod (minfo. classID, minfo. methodID); else; // print error...