행맨 (hangman) 게임을위한 키보드 디스플레이 용 Sprite 객체의로드 및 처리를 구현하기 위해 for 루프를 사용합니다. 루프가 네 번째 반복을 완료하고 충돌합니다. 그것은 나를주는 오류는 말한다 :안드로이드의 배열에 여러 텍스처로드 Andengine
Texture must not exceed the bounds of the atlas
이 실제로 모든 이미지는 64 × 64이고지도 책과 같은 선언으로 작동합니다 : 나는지도 책의 배열 및 배열을 사용하고
this.mAtlas[i] = new BitmapTextureAtlas(this.getTextureManager(),256, 256,TextureOptions.BILINEAR);
이미지를로드 할 텍스쳐와 나는 아틀라스를로드합니다. 그런 다음 스프라이트를 구현하는 사용자 정의 클래스에 텍스처를 전달합니다. 마지막으로로드 된 스프라이트를 장면에 첨부합니다.
for(int i = 0; i < 28; i++)
{
String name = Integer.toString(i);
name+= ".png";
this.mAtlas[i] = new BitmapTextureAtlas(this.getTextureManager(),256, 256,TextureOptions.BILINEAR);
this.mTexture[i] = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mAtlas[i], this, name, (i*64) + 5,0);
this.mAtlas[i].load();
if(i % 13 == 0)
{
yPos -= 64;
}
if(i < 26)
{
letterPass = alphabet.substring(i);
}
else if(i == 26)
{
letterPass = "BackSpace";
}
else if(i == 27)
{
letterPass = "return";
}
letters[i] = new Letter((i * 64)+ 5.0f, yPos, this.mTexture[i].getHeight(), this.mTexture[i].getHeight(), this.mTexture[i], this.mEngine.getVertexBufferObjectManager());
letters[i].setLetter(letterPass);
mScene.attachChild(letters[i]);
}
충돌이 발생하는 라인은 다음과 같습니다 :
this.mTexture[i] = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mAtlas[i], this, name, (i*64) + 5,0);
나는 그것이 충돌 왜 알아낼 수 없습니다 내가 어떤 도움