Game Development Reference
In-Depth Information
After this, make the following changes to the same class:
public class CanyonBunnyMain extends DirectedGame {
...
}
Next, we are going to move on to MenuScreen . Make the following changes to
this class:
public MenuScreen (DirectedGame game) {
super(game);
}
After this, add the following code to the same class:
import com.badlogic.gdx.InputProcessor;
@Override
public InputProcessor getInputProcessor () {
return stage;
}
Finally, remove the line that sets the input processor in show() so that it now
looks as follows:
@Override
public void show () {
stage = new Stage(new
StretchViewport(Constants.VIEWPORT_GUI_WIDTH,
Constants.VIEWPORT_GUI_HEIGHT));
rebuildStage();
}
Next, we are going to move on to GameScreen . Make the following changes to
this class:
public GameScreen (DirectedGame game) {
super(game);
}
After this, add the following code to the same class:
import com.badlogic.gdx.InputProcessor;
@Override
public InputProcessor getInputProcessor () {
return worldController;
}
 
Search WWH ::




Custom Search