Skip to content
Browse files

add new code Nura Next step

  • Loading branch information...
1 parent a4182ce commit 4b33df200f535b1e42513edcae751d2a7f39b8b8 @ZolXela committed May 15, 2012
View
4 src/falldowndizzy/pac/Dizzy.java
@@ -11,6 +11,10 @@
public Dizzy(final float pX, final float pY, final ITiledTextureRegion pTiledTextureRegion, final VertexBufferObjectManager pVertexBufferObjectManager) {
super(pX, pY, pTiledTextureRegion, pVertexBufferObjectManager);
+ this.setScaleCenterY(pTiledTextureRegion.getHeight());
+// this.setScale(2);
+ this.animate(new long[]{200, 200, 200}, 4, 5, true);
+// player.registerEntityModifier(new JumpModifier(50, playerX, playerX+30, playerY, playerY, 50, 50));
}
}
View
10 src/falldowndizzy/pac/Game_Scene.java
@@ -31,11 +31,9 @@ public Game_Scene(){
autoParallaxBackgroundXY.attachParallaxEntityXY(new AutoParallaxBackgroundXY.ParallaxEntityXY(0.0f, 0.0f, new Sprite(0, 0, GfxAssets.mParallaxLayerBack, vertexBufferObjectManager)));
autoParallaxBackgroundXY.attachParallaxEntityXY(new AutoParallaxBackgroundXY.ParallaxEntityXY(5.0f, 0.0f, new Sprite(0, 0, GfxAssets.mParallaxLayerCloud, vertexBufferObjectManager)));
autoParallaxBackgroundXY.attachParallaxEntityXY(new AutoParallaxBackgroundXY.ParallaxEntityXY(0.0f, 0.0f, new Sprite(0, 0, GfxAssets.mParallaxLayerTrees, vertexBufferObjectManager)));
-
- autoParallaxBackgroundXY.attachParallaxEntityXY(new AutoParallaxBackgroundXY.ParallaxEntityXY(10.0f, 0.0f, this.CreateDizzy(30, 30)));
-
+
setBackground(autoParallaxBackgroundXY);
-
+
final Rectangle _sprite = new Rectangle(20, 350, 280, 50,
GameActivity.mVertexBufferObjectManager)
{
@@ -48,7 +46,7 @@ public boolean onAreaTouched(TouchEvent pSceneTouchEvent,
};
attachChild(_sprite);
- // attachChild(this.CreateDizzy(30, 30));
+ attachChild(this.CreateDizzy(0, 0));
_sprite.setColor(Color.GREEN);
registerTouchArea(_sprite);
}
@@ -66,7 +64,7 @@ public void Hide(){
public Dizzy CreateDizzy(float pX, float pY){
mPhysicsWorld = new PhysicsWorld(
- new Vector2(0, SensorManager.GRAVITY_EARTH), false);
+ new Vector2(0, SensorManager.GRAVITY_EARTH/10), false);
this.registerUpdateHandler(mPhysicsWorld);
final FixtureDef MyFixtureDef = PhysicsFactory.createFixtureDef(0.0f, 0.1f, 0.2f, true);
View
2 src/falldowndizzy/pac/GfxAssets.java
@@ -28,7 +28,7 @@ public static void LoadGFX() {
// mAnimatedSpriteTexture = new BuildableBitmapTextureAtlas(GameActivity._Engine.getTextureManager(), 1024, 1024);
- mPlayer = BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(mAutoParallaxBackgroundTexture, GameActivity._main, "player.png", 321, 481, 100, 100);
+ mPlayer = BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(mAutoParallaxBackgroundTexture, GameActivity._main, "player.png", 321, 481, 3, 5);
// mAnimatedSpriteTexture.load();
mAutoParallaxBackgroundTexture.load();
}

0 comments on commit 4b33df2

Please sign in to comment.
Something went wrong with that request. Please try again.