我尝试使用Actor的InputListener,但它不起作用。我真的不知道为什么。我发现了很多关于它的信息,并看到了官方文档,但没有一个没有帮助我。 当我触摸精灵时,我的日志消息不会显示。但是,如果我使用全局输入处理器(对于整个屏幕)它可以正常工作,但我只想为actor添加一个侦听器。 我在做什么错? public class GameScreen implements Screen {
我已经拍摄的图像按钮用下面的代码: skin = new Skin(Gdx.files.internal("glassy-ui.json"));
button2 = new ImageButton(skin);
myTexture = new Texture(Gdx.files.internal("PlayButton.png"));
myTextureRegi
在GameScreen我写了这个代码为比分类: if (Gdx.input.justTouched()&& executed==true) {
MyGdxGame.camera.unproject(touchPoint.set(Gdx.input.getX(), Gdx.input.getY(), 0));
for (int i=0;i<4;i++) {
if (sp