Android Open Source - googol Screen






From Project

Back to project page googol.

License

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.

Java Source Code

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;
  }
}




Java Source Code List

com.martinb.googol.Googol.java
com.martinb.googol.Control.Assets.java
com.martinb.googol.Control.Input.java
com.martinb.googol.Control.Path.java
com.martinb.googol.Control.Upgrades.java
com.martinb.googol.Objects.Body.java
com.martinb.googol.Objects.Character.java
com.martinb.googol.Objects.Coin.java
com.martinb.googol.Objects.World.java
com.martinb.googol.Screens.MenuScreen.java
com.martinb.googol.Screens.Screen.java
com.martinb.googol.android.AndroidLauncher.java
com.martinb.googol.client.HtmlLauncher.java
com.martinb.googol.desktop.DesktopLauncher.java