我正在libGDX中爲android製作一個氣球彈出遊戲,而且我目前被困在如何在用戶觸摸它們時使氣球彈出。我嘗試使用touchDown()方法, b = new Balloon();
b.addListener(
new InputListener()
{
public boolean touchDown(InputEvent event
我寫了下面的代碼: int color = Color.argb8888(255, rand.nextInt(256), rand.nextInt(256), rand.nextInt(256));
stage.getBatch().setColor(color);
有了這個代碼,我想隨意改變精靈的顏色。不幸的是,舞臺上所有精靈的顏色都變了,但我想聲明我想要着色的精靈。我如何改進我的代碼?