public void create() { //код stage = new Stage(); stage.addActor(tank); // оба танка наследуются от 1 класса stage.addActor(tank2); Gdx.input.setInputProcessor(stage); } render
public void render() { //код stage.act(Gdx.graphics.getDeltaTime()); stage.draw(); //код } both actor are displayed, but only tank2 responds to pressing.
How to make it so that when you press 1 with a finger, both actor'a react simultaneously?
I tried InputMultiplexer, but they react to pressing with 2 fingers (each actor with 1 finger in turn).
in the description for the Stage class:
If you want to make a note of the event
If actor processed the event, returning true from the input method, then the input method of the Stage class will also return true, as a result the subsequent InputProcessors will not receive the event.