我试图在我的程序中显示一个简单的图像,但该函数没有显示任何内容!带有一些评论的准则不言自明:
public void draw(SpriteBatch batch, float parentAlpha){
batch.draw(plane, this.getX(), this.getY(), this.getWidth()/2, this.getHeight()/2, this.getWidth(), this.getHeight(), 0, 0,
this.getRotation(), 0 , 0, plane.getWidth(), plane.getHeight(), false, false); //shows nothing
//batch.draw(texture, x, y, originX, originY, width, height, scaleX, scaleY, rotation, srcX, srcY, srcWidth, srcHeight, flipX, flipY)
batch.draw(plane, this.getX(), this.getY()); //shows the image at x, y (0, 0)
//batch.draw(texture, x, y)
}
我希望你能理解我的问题。谢谢你的帮助