皆さん、COCOS2DのようにAndEngineからAnimateSpriteシートを作成する方法があることを誰かが知ってくれるでしょうか。
ありがとう。
皆さん、COCOS2DのようにAndEngineからAnimateSpriteシートを作成する方法があることを誰かが知ってくれるでしょうか。
ありがとう。
どうぞ!私はこれがあなたが探しているものだと信じています。
AnimatedSprite runner = new AnimatedSprite(0, 0, mRunner);
// Animate with 100 milliseconds each frame, start at frame 0 and go through
// frame 3, set to true for looping otherwise false for no looping.
runner.animate(new long[] { 100, 100, 100, 100 }, 0, 3, true);
scene.attachChild(runner);
および onLoadResources() で
this.mRunnerTexture = new Texture(512, 128, TextureOptions.DEFAULT);
this.mRunner = TextureRegionFactory.createTiledFromAsset(this.mRunnerTexture, this, "gfx/runner.png", 0, 0, 4, 1); // 4 columns and 1 row, a 4x1 animated sprite
this.mEngine.getTextureManager().loadTextures(this.mRunnerTexture);