1
组工作
我有我的舞台已经添加在我的屏幕libGDX:输入处理器不能与
//Code in show() method of my screen
MyGroup myGroup = new MyGroup();
Stage stage = new Stage();
stage.add(myGroup);
//And also there are few more actors which are omitted
Gdx.input.setInputProcessor(stage);
//Code in my group
public MyGroup extends Group implements InputProcessor{
//Many methods and attributes and a constructor
//Overridden methods of input listener.
在我组我有5个演员可以彼此这样被交换一组,我不想以处理个人参与者的任何投入。我想在小组中做到这一点。
但是当我触摸/ touchDrag时,没有任何方法被调用。
请帮忙。
Thanks @noone。它的工作现在:) –
现在我面临一个更多的问题。也就是说,我从touchDragged事件获得的触摸坐标是通过X轴镜像的。任何想法为什么发生这种情况? –
那么,这些坐标是屏幕空间坐标。舞台和演员有特殊的方法将坐标转换为不同的坐标系。例如screenToStage或stageToLocal。 – noone