/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.game.runner.scene;

import com.badlogic.gdx.math.Vector2;
import org.andengine.entity.scene.IOnSceneTouchListener;
import org.andengine.entity.scene.Scene;
import org.andengine.entity.scene.background.Background;
import org.andengine.extension.physics.box2d.PhysicsWorld;
import org.andengine.input.touch.TouchEvent;
import org.andengine.util.adt.color.Color;
import org.game.runner.base.BaseScene;
import org.game.runner.manager.AudioManager;
import org.game.runner.manager.SceneManager;
import org.game.runner.manager.SceneManager.SceneType;

/**
 *
 * @author Karl
 */
public class GameLevelScene extends BaseScene implements IOnSceneTouchListener{
    private PhysicsWorld physicWorld;
    
    @Override
    public void createScene() {
        this.physicWorld = new PhysicsWorld(new Vector2(0, -1), false);
        
        this.setBackground(new Background(Color.BLACK));
    }

    @Override
    public void onBackKeyPressed() {
        AudioManager.getInstance().stop();
        SceneManager.getInstance().unloadGameLevelScene();
    }

    @Override
    public void onPause() {
    }

    @Override
    public void onResume() {
    }

    @Override
    public SceneType getSceneType() {
        return SceneType.SCENE_GAME_LEVEL;
    }

    @Override
    public void disposeScene() {
        this.detachSelf();
        this.dispose();
    }

    public boolean onSceneTouchEvent(Scene pScene, TouchEvent pSceneTouchEvent) {
        return false;
    }
    
}

@@ -174,154 +174,579 @@
 ort 
-org.andengine.entity.scene.IOnSceneTouchListener;%0Aimport org.andengine.entity.scene.Scene;%0Aimport org.andengine.entity.scene.background.Background
+com.badlogic.gdx.physics.box2d.Body;%0Aimport com.badlogic.gdx.physics.box2d.BodyDef;%0Aimport com.badlogic.gdx.physics.box2d.FixtureDef;%0Aimport org.andengine.entity.primitive.Rectangle;%0Aimport org.andengine.entity.scene.IOnSceneTouchListener;%0Aimport org.andengine.entity.scene.Scene;%0Aimport org.andengine.entity.scene.background.Background;%0Aimport org.andengine.entity.sprite.Sprite;%0Aimport org.andengine.extension.physics.box2d.FixedStepPhysicsWorld;%0Aimport org.andengine.extension.physics.box2d.PhysicsConnector;%0Aimport org.andengine.extension.physics.box2d.PhysicsFactory
 ;%0Aim
@@ -1220,16 +1220,72 @@
 cWorld;%0A
+    private Body groundBody;%0A    private Body testBody;%0A
     %0A   
@@ -1319,32 +1319,98 @@
 createScene() %7B%0A
+        this.setBackground(new Background(Color.BLACK));%0A        %0A
         this.phy
@@ -1424,16 +1424,25 @@
 d = new 
+FixedStep
 PhysicsW
@@ -1446,16 +1446,20 @@
 csWorld(
+30, 
 new Vect
@@ -1470,9 +1470,10 @@
 0, -
-1
+20
 ), f
@@ -1491,63 +1491,838 @@
     
-%0A        this.setBackground(new Background(Color.BLACK)
+this.registerUpdateHandler(this.physicWorld);%0A        %0A        final FixtureDef wallFixtureDef = PhysicsFactory.createFixtureDef(0, 0, 0);%0A        %0A        Rectangle ground = new Rectangle(400, 50, 800, 10, this.vbom);%0A%09this.groundBody = PhysicsFactory.createBoxBody(this.physicWorld, ground, BodyDef.BodyType.StaticBody, wallFixtureDef);%0A        %0A        Sprite test = new Sprite(400, 200, this.resourcesManager.testGamePlayer, this.vbom);%0A%09this.testBody = PhysicsFactory.createBoxBody(this.physicWorld, test, BodyDef.BodyType.DynamicBody, wallFixtureDef);%0A        test.setUserData(this.testBody);%0A        %0A        attachChild(ground);%0A        %0A        attachChild(test);%0A        this.physicWorld.registerPhysicsConnector(new PhysicsConnector(test, this.testBody, true, false));%0A        %0A        this.setOnSceneTouchListener(this
 );%0A 
@@ -2871,24 +2871,145 @@
 uchEvent) %7B%0A
+        if (pSceneTouchEvent.isActionDown())%7B%0A            this.testBody.setLinearVelocity(new Vector2(0, 10));%0A        %7D%0A
         retu

Add physics base