1
AndEngine을 사용한 일부 안드로이드 프로그래밍을 해왔으며 Hashtables로 어떤 이상한 일이 발생했습니다.AndEngine이 포함 된 Java Hashtable
나는이 할 기본적 경우 : 미세
BitmapTextureAtlas m_textureAtlas = new BitmapTextureAtlas(p_baseActivity.getTextureManager(), 1024, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
TextureRegion texture1 = BitmapTextureAtlasTextureRegionFactory.createFromAsset(m_textureAtlas, p_baseActivity, "Chrysanthemum.jpg", 0, 0);
m_textureAtlas.load();
Sprite m_sprite1 = new Sprite(0, 0, texture1, p_baseActivity.getEngine().getVertexBufferObjectManager());
this.attachChild(m_sprite1);
모든 단어를. 하지만 이렇게하면 :
BitmapTextureAtlas m_textureAtlas = new BitmapTextureAtlas(p_baseActivity.getTextureManager(), 1024, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
Hashtable<String, TextureRegion> test = new Hashtable<String, TextureRegion>();
TextureRegion texture1 = test.put("1", BitmapTextureAtlasTextureRegionFactory.createFromAsset(m_textureAtlas, p_baseActivity, "Chrysanthemum.jpg", 0, 0));
m_textureAtlas.load();
Sprite m_sprite1 = new Sprite(0, 0, texture1, p_baseActivity.getEngine().getVertexBufferObjectManager());
this.attachChild(m_sprite1);
이미지 (이미지)가 깜박이고 크기가 모두 잘못되었습니다. 지금 당장이 프로젝트의 첫 번째 코드를 작성하는 것이 좋지만 뭔가 잘못하고 있는지 또는 put()의 반환 값을 피하는지를 잘 모르겠습니다.
나는 본다! 고마워. –