andengine

andengine sprite move PathModifier and body

余生颓废 提交于 2019-12-02 14:26:34
问题 i use this code this.mPhysicsWorld = new FixedStepPhysicsWorld(30, new Vector2(0, 0), false, 8, 1); this.mScene.registerUpdateHandler(this.mPhysicsWorld); final AnimatedSprite chat_sale_1 = new AnimatedSprite(2157, 638, this.mchatSaleTextureRegion); //final PhysicsHandler physicsHandler2 = new PhysicsHandler(chat_sale_1); //chat_sale_1.registerUpdateHandler(physicsHandler2); final FixtureDef chat_sale_1FixtureDef = PhysicsFactory.createFixtureDef(0, 0, 0f); mCatBody = PhysicsFactory

Unable to display game screen while admob integrated with AndEngine + google play service

微笑、不失礼 提交于 2019-12-02 11:19:44
I am using andengine for my game development with google play services, my game works fine. But once I added admob with "onSetContentView" callback called, my game screen goes black and only ads are visible. Here is my callback onSetContentView function: @override protected void onSetContentView() { this.mRenderSurfaceView = new RenderSurfaceView(this); this.mRenderSurfaceView.setRenderer(mEngine, this); final android.widget.FrameLayout.LayoutParams surfaceViewLayoutParams = new FrameLayout.LayoutParams(super.createSurfaceViewLayoutParams()); Log.i(TAG,"In funcion OnSetContaitView"); /

How to add a library in Intellij Idea

谁都会走 提交于 2019-12-02 10:12:37
I recently switched from Eclipse to Intellij. Now I'm trying to use the andengine library. In Eclipse it was easy to add libraries. Just right click > properties > add library. In Intellij there is no option when you right click a folder (see image). How can I add a project library (a folder, not a jar file) in Intellij? Thank you.. Navigate to File > Project Structure , select Modules , and hit the plus button to add another folder (with source code). Directly to the game engine to add to the project (intelliJ IDEA all versions); Create new project or open existing project. Right click "Java"

Fatal signal 11 (andengine project)

隐身守侯 提交于 2019-12-02 10:10:10
I'm creating and android game powered by andengine framework the box2d extension I'm getting "Fatal Signal 11" which seems to happen out of nowhere (I guess you can call it randomly) there no clues (at least, I don't aware to any clues to help me solve this problem) my guesses are: 1) I'm creating game's entities using TimerTask class 2) maybe it has something to do with concurrency? what do you think? thanks, socksocket You could still use a TimerTask, you just need to be sure to call anything relating to AndEngine (creating or deleting sprites, etc) on the AndEngine update thread - you can

andengine sprite move PathModifier and body

吃可爱长大的小学妹 提交于 2019-12-02 09:55:33
i use this code this.mPhysicsWorld = new FixedStepPhysicsWorld(30, new Vector2(0, 0), false, 8, 1); this.mScene.registerUpdateHandler(this.mPhysicsWorld); final AnimatedSprite chat_sale_1 = new AnimatedSprite(2157, 638, this.mchatSaleTextureRegion); //final PhysicsHandler physicsHandler2 = new PhysicsHandler(chat_sale_1); //chat_sale_1.registerUpdateHandler(physicsHandler2); final FixtureDef chat_sale_1FixtureDef = PhysicsFactory.createFixtureDef(0, 0, 0f); mCatBody = PhysicsFactory.createBoxBody(this.mPhysicsWorld, chat_sale_1, BodyType.DynamicBody, chat_sale_1FixtureDef); //mCatBody.setColor

Drawing a circle using Andengine

China☆狼群 提交于 2019-12-01 21:13:46
I am searching a way to draw a circle using Andengine. As I can see, I can only draw lines, rectangles, and place sprites, but I cannot find a way to draw circles. How can I do this? Indeed, you can't directly draw a circle. Alternatives are: Rendering a quad with a circle texture (see this link , for example) Rendering a circle that's actually a circle of connected triangles. You'd have to procedurally generate the geometry to approximate a circle. For a solid circle, that's not so hard. A hollow circle / circle outline, a bit more involved, I suppose. You could also draw a circle with lines,

How do I make a body ignore gravity (AndEngine)?

落爺英雄遲暮 提交于 2019-12-01 20:39:45
I have a sprite (with a body) that bounces around the scene. It needs to be unaffected by gravity, but also able to collide with other bodies on the scene. This means I cannot use a kinematic body. I tried: body = PhysicsFactory.createCircleBody(mPhysicsWorld, this, BodyType.DynamicBody, PhysicsFactory.createFixtureDef(.5f, .5f, .5f)); MassData md = new MassData(); md.mass=0; body.setMassData(md); mPhysicsWorld.registerPhysicsConnector(new PhysicsConnector(this, body, true, true)); with different values for my FixtureDef, but nothing seemed to work. My body still falls to the bottom of the

java.lang.IndexOutOfBoundsException: Invalid index 13, size is 13

左心房为你撑大大i 提交于 2019-12-01 19:40:26
Im getting some weird error which crashing my android app. Its a quiz app. So when user answer 2/3 question correctly then click the next button this it crash. and show index 13 error. But i couldn't figure out where to fix/ look for. here is my code snippet. public Vector<Sprite> defaultTile; private void GameResults() { if(result.equals("right")) { GameOver(); Log.e("Gaa", "Right Here ->"); } } private void GameOver() { { for (int i = 0; i < defaultTile.size(); i++) { defaultTile.get(i).setVisible(false); } for (int i = 0; i < defaultTile.size(); i++) { unregisterTouchArea(defaultTile.get(i)

AndEngine error on loading library

可紊 提交于 2019-12-01 19:26:31
I have a problem while running the examples from andengine. The error I'm getting is at this line: System.loadLibrary( "andenginephysicsbox2dextension" ); Couldn't load andenginephysics2dextension. Find library returned null. I noticed other people kept having this problem but no solution was proposed. Any help is welcomed! Thanks. looks like you missed to copy the native libraries. AndEngine is now hosted on github and it is in perfectly active development! ( https://github.com/nicolasgramlich/AndEngine ) more info on what changed in the new GLES2 version here: http://www.andengine.org/forums

AndEngine error on loading library

烈酒焚心 提交于 2019-12-01 18:34:44
问题 I have a problem while running the examples from andengine. The error I'm getting is at this line: System.loadLibrary( "andenginephysicsbox2dextension" ); Couldn't load andenginephysics2dextension. Find library returned null. I noticed other people kept having this problem but no solution was proposed. Any help is welcomed! Thanks. 回答1: looks like you missed to copy the native libraries. AndEngine is now hosted on github and it is in perfectly active development! ( https://github.com