Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6149285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:25:37+00:00 2026-05-23T19:25:37+00:00

I am using andengine to develop a game in android. I placed an object

  • 0

I am using andengine to develop a game in android. I placed an object in sprite like

 this.mTexture = new Texture(32, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
            this.mFaceTextureRegion = TextureRegionFactory.createFromAsset(this.mTexture, this, "gfx/bike.png", 0, 0);
---- and i place like 
Sprite bikeSprite= new Sprite(20, 50, this.mFaceTextureRegion);

I want to use this sprite in j2me sprite

bikeSprite.move(--); How do I do it in android. I dont want to use setPosition .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:25:37+00:00Added an answer on May 23, 2026 at 7:25 pm
    public class EntityModifierExample extends BaseExample {
        // ===========================================================
        // Constants
        // ===========================================================
    
        private static final int CAMERA_WIDTH = 720;
        private static final int CAMERA_HEIGHT = 480;
    
        // ===========================================================
        // Fields
        // ===========================================================
    
        private Camera mCamera;
        private Texture mTexture;
        private TiledTextureRegion mFaceTextureRegion;
    
        // ===========================================================
        // Constructors
        // ===========================================================
    
        // ===========================================================
        // Getter & Setter
        // ===========================================================
    
        // ===========================================================
        // Methods for/from SuperClass/Interfaces
        // ===========================================================
    
        @Override
        public Engine onLoadEngine() {
            this.mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
            return new Engine(new EngineOptions(true, ScreenOrientation.LANDSCAPE, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), this.mCamera));
        }
    
        @Override
        public void onLoadResources() {
            this.mTexture = new Texture(64, 32, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
            this.mFaceTextureRegion = TextureRegionFactory.createTiledFromAsset(this.mTexture, this, "gfx/face_box_tiled.png", 0, 0, 2, 1);
    
            this.mEngine.getTextureManager().loadTexture(this.mTexture);
        }
    
        @Override
        public Scene onLoadScene() {
            this.mEngine.registerUpdateHandler(new FPSLogger());
    
            final Scene scene = new Scene();
            scene.setBackground(new ColorBackground(0.09804f, 0.6274f, 0.8784f));
    
            final int centerX = (CAMERA_WIDTH - this.mFaceTextureRegion.getWidth()) / 2;
            final int centerY = (CAMERA_HEIGHT - this.mFaceTextureRegion.getHeight()) / 2;
    
            final Rectangle rect = new Rectangle(centerX + 100, centerY, 32, 32);
            rect.setColor(1, 0, 0);
    
            final AnimatedSprite face = new AnimatedSprite(centerX - 100, centerY, this.mFaceTextureRegion);
            face.animate(100);
            face.setBlendFunction(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);
    
            final LoopEntityModifier entityModifier =
                new LoopEntityModifier(
                        new IEntityModifierListener() {
                            @Override
                            public void onModifierStarted(final IModifier<IEntity> pModifier, final IEntity pItem) {
                                EntityModifierExample.this.runOnUiThread(new Runnable() {
                                    @Override
                                    public void run() {
                                        Toast.makeText(EntityModifierExample.this, "Sequence started.", Toast.LENGTH_LONG).show();
                                    }
                                });
                            }
    
                            @Override
                            public void onModifierFinished(final IModifier<IEntity> pEntityModifier, final IEntity pEntity) {
                                EntityModifierExample.this.runOnUiThread(new Runnable() {
                                    @Override
                                    public void run() {
                                        Toast.makeText(EntityModifierExample.this, "Sequence finished.", Toast.LENGTH_LONG).show();
                                    }
                                });
                            }
                        },
                        1,
                        new ILoopEntityModifierListener() {
                            @Override
                            public void onLoopStarted(final LoopModifier<IEntity> pLoopModifier, final int pLoop, final int pLoopCount) {
                                EntityModifierExample.this.runOnUiThread(new Runnable() {
                                    @Override
                                    public void run() {
                                        Toast.makeText(EntityModifierExample.this, "Loop: '" + (pLoop + 1) + "' of '" + pLoopCount + "' started.", Toast.LENGTH_SHORT).show();
                                    }
                                });
                            }
    
                            @Override
                            public void onLoopFinished(final LoopModifier<IEntity> pLoopModifier, final int pLoop, final int pLoopCount) {
                                EntityModifierExample.this.runOnUiThread(new Runnable() {
                                    @Override
                                    public void run() {
                                        Toast.makeText(EntityModifierExample.this, "Loop: '" + (pLoop + 1) + "' of '" + pLoopCount + "' finished.", Toast.LENGTH_SHORT).show();
                                    }
                                });
                            }
                        },
                        new SequenceEntityModifier(
                                new RotationModifier(1, 0, 90),
                                new AlphaModifier(2, 1, 0),
                                new AlphaModifier(1, 0, 1),
                                new ScaleModifier(2, 1, 0.5f),
                                new DelayModifier(0.5f),
                                new ParallelEntityModifier(
                                        new ScaleModifier(3, 0.5f, 5),
                                        new RotationByModifier(3, 90)
                                ),
                                new ParallelEntityModifier(
                                        new ScaleModifier(3, 5, 1),
                                        new RotationModifier(3, 180, 0)
                                )
                        )
                );
    
            face.registerEntityModifier(entityModifier);
            rect.registerEntityModifier(entityModifier.clone());
    
            scene.attachChild(face);
            scene.attachChild(rect);
    
            return scene;
        }
    
        @Override
        public void onLoadComplete() {
    
        }
    
        // ===========================================================
        // Methods
        // ===========================================================
    
        // ===========================================================
        // Inner and Anonymous Classes
        // ===========================================================
    }
    

    This code is extracted from the samples project Andengine. Reference to the original code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to android... I want to create simple android game using Andengine.
So in an android game (using andEngine) I'm making, I'm trying to save a
I am making a game using Andengine/Box2D physics addon. I experienced the random crashes
I am trying to implement Accelerometer in my game using Andengine and i also
I am trying to make a simple skateboarding game using AndEngine and the Box2D
This is just a curiosity question. I've started developing with AndEngine a 2d openGL
I have a method in engine i'm using (andengine) : public final void setText(String
I am using sprite and Animated sprite. I used Animated sprite for 16 frames.
Ok so I have been trying to fix this for days, and I'm not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.