package org.game.runner;

import android.app.Activity;
import android.os.Bundle;

public class GameActivity extends Activity
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}

@@ -38,46 +38,666 @@
 oid.
-app.Activity;%0Aimport android.os.Bundle
+os.Bundle;%0Aimport android.view.KeyEvent;%0Aimport java.io.IOException;%0Aimport org.andengine.engine.Engine;%0Aimport org.andengine.engine.LimitedFPSEngine;%0Aimport org.andengine.engine.camera.Camera;%0Aimport org.andengine.engine.options.EngineOptions;%0Aimport org.andengine.engine.options.ScreenOrientation;%0Aimport org.andengine.engine.options.WakeLockOptions;%0Aimport org.andengine.engine.options.resolutionpolicy.RatioResolutionPolicy;%0Aimport org.andengine.entity.scene.Scene;%0Aimport org.andengine.ui.activity.BaseGameActivity;%0Aimport org.game.runner.manager.AudioManager;%0Aimport org.game.runner.manager.ResourcesManager;%0Aimport org.game.runner.manager.SceneManager
 ;%0A%0Ap
@@ -729,24 +729,32 @@
 extends 
+BaseGame
 Activity
 %0A%7B%0A    /
@@ -749,219 +749,2579 @@
 vity
-%0A
 %7B%0A    
-/** Called when the activity is first created. */%0A    @Override%0A    public void onCreate(Bundle savedInstanceState)%0A    %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.main);
+%0A    private Camera camera;%0A    private ResourcesManager resourcesManager;%0A    private SceneManager sceneManager;%0A%0A    @Override%0A    public EngineOptions onCreateEngineOptions() %7B%0A        this.camera = new Camera(0, 0, 800, 480);%0A        EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, new RatioResolutionPolicy(800, 480), this.camera);%0A        engineOptions.getAudioOptions().setNeedsMusic(true).setNeedsSound(true);%0A        engineOptions.setWakeLockOptions(WakeLockOptions.SCREEN_ON);%0A        return engineOptions;%0A    %7D%0A    %0A    @Override%0A    public Engine onCreateEngine(EngineOptions pEngineOptions) %7B%0A        return new LimitedFPSEngine(pEngineOptions, 60);%0A    %7D%0A    %0A    @Override%0A    public void onCreateResources(OnCreateResourcesCallback pOnCreateResourcesCallback) throws IOException %7B%0A        ResourcesManager.prepareManager(this.mEngine, this, this.camera, getVertexBufferObjectManager());%0A        this.resourcesManager = ResourcesManager.getInstance();%0A        pOnCreateResourcesCallback.onCreateResourcesFinished();%0A    %7D%0A%0A    @Override%0A    public void onCreateScene(OnCreateSceneCallback pOnCreateSceneCallback) throws IOException %7B%0A        SceneManager.getInstance().createSplashScene(pOnCreateSceneCallback);%0A    %7D%0A%0A    @Override%0A    public void onPopulateScene(Scene pScene, OnPopulateSceneCallback pOnPopulateSceneCallback) throws IOException %7B%0A        throw new UnsupportedOperationException(%22Not supported yet.%22);%0A    %7D%0A    %0A    @Override%0A    protected void onDestroy() %7B%0A        super.onDestroy();%0A        if (this.isGameLoaded())%7B%0A            AudioManager.getInstance().stop();%0A            System.exit(0);    %0A        %7D %0A    %7D%0A    %0A    @Override%0A    public synchronized void onPauseGame() %7B%0A        super.onPauseGame();%0A        SceneManager.getInstance().getCurrentScene().onPause();%0A    %7D%0A    %0A    @Override%0A    public synchronized void onResumeGame() %7B%0A        super.onResumeGame();%0A        SceneManager.getInstance().getCurrentScene().onResume();%0A    %7D%0A    %0A    @Override%0A    protected void onPause() %7B%0A        super.onPause();%0A        SceneManager.getInstance().getCurrentScene().onPause();%0A    %7D%0A    %0A    @Override%0A    protected synchronized void onResume() %7B%0A        super.onResume();%0A        SceneManager.getInstance().getCurrentScene().onResume();%0A    %7D%0A    %0A    @Override%0A    public boolean onKeyDown(int keyCode, KeyEvent event) %7B  %0A        if (keyCode == KeyEvent.KEYCODE_BACK)%7B%0A            SceneManager.getInstance().getCurrentScene().onBackKeyPressed();%0A        %7D%0A        return false; 
 %0A   

Implement GameActivity for AndEngine