Back to project page googol.
The source code is released under:
MIT License
If you think the Android project googol listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.martinb.googol.Screens; //from w w w.ja va2s . c o m import com.badlogic.gdx.math.Vector2; import com.martinb.googol.Googol; import com.martinb.googol.Control.Input; import com.martinb.googol.Objects.World; /** * * Common code for all screens * */ public class Screen implements com.badlogic.gdx.Screen { World world; Input input; Googol game; Vector2 screenSize; public Screen(Googol game) { this.game = game; this.screenSize = game.getScreenSize(); input = new Input(this); } @Override public void render(float delta) { world.render(delta); } @Override public void resize(int width, int height) { this.screenSize = game.getScreenSize(); world.resize(width, height); } @Override public void show() { } @Override public void hide() { } @Override public void pause() { } @Override public void resume() { } @Override public void dispose() { world.dispose(); } /** * Returns screen size in pixels */ public Vector2 getScreenSize() { return screenSize; } }