How to load sprite from SD card into AndEngine

I am new to AndEngine. I am trying to play an animation using spritesheet (generated using TexturePacker), and I have successfully animated by addressing this question ( Download animation with texture packer in andengine )

Q 1. How to download sprites and xml files from an SD card. (In the above example, spritesheet and xml files are loaded from the Asset folder).

Q 2. I want to add sound to the animation. Is there any way to do this?

+4
source share
1 answer

Havent , , BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/"); gfx SD-.

,

(ogg) res\raw

MediaPlayer mp = MediaPlayer.create(getApplicationContext(), soundType);
mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
mp.start();
0

Source: https://habr.com/ru/post/1539728/


All Articles