最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - Sprites stored in another file not being drawn to SpriteBatch - Stack Overflow

programmeradmin0浏览0评论

I just started using LibGDX (1.13.1) recently, and I'm running into an issue where Sprites created in and stored in a separate file (FloorManager.java).

In Main.java, I have the code in Draw() (being run in Render()):

ScreenUtils.clear(Color.BLACK);
viewport.apply();
spriteBatch.setProjectionMatrix(viewport.getCamera()bined);
spriteBatch.begin();

for (Sprite floorSprite : flooring.floorSprites) {
    floorSprite.draw(spriteBatch);
}

spriteBatch.end();

When I run this code, it shows a black screen (implying that everything up to the For loop is functional), and when I add a System.out.printLn(floorSprite); to the loop, it shows that it's storing sprite info correctly as well.

I'm running out of ideas now to fix it.

发布评论

评论列表(0)

  1. 暂无评论