List of usage examples for com.badlogic.gdx.math Vector3 Vector3
public Vector3()
From source file:app.badlogicgames.superjumper.GameScreen.java
License:Apache License
public GameScreen(Game game) { this.game = game; state = GAME_READY;/* w w w . j av a 2 s . c o m*/ guiCam = new OrthographicCamera(320, 480); guiCam.position.set(320 / 2, 480 / 2, 0); touchPoint = new Vector3(); batcher = new SpriteBatch(); worldListener = new WorldListener() { @Override public void jump() { Assets.playSound(Assets.jumpSound); } @Override public void highJump() { Assets.playSound(Assets.highJumpSound); } @Override public void hit() { Assets.playSound(Assets.hitSound); } @Override public void coin() { Assets.playSound(Assets.coinSound); } }; world = new World(worldListener); renderer = new WorldRenderer(batcher, world); pauseBounds = new Rectangle(320 - 64, 480 - 64, 64, 64); resumeBounds = new Rectangle(160 - 96, 240, 192, 36); quitBounds = new Rectangle(160 - 96, 240 - 36, 192, 36); lastScore = 0; scoreString = "SCORE: 0"; }
From source file:app.badlogicgames.superjumper.HelpScreen.java
License:Apache License
public HelpScreen(Game game) { this.game = game; guiCam = new OrthographicCamera(320, 480); guiCam.position.set(320 / 2, 480 / 2, 0); nextBounds = new Rectangle(320 - 64, 0, 64, 64); touchPoint = new Vector3(); batcher = new SpriteBatch(); helpImage = Assets.loadTexture("data/help1.png"); helpRegion = new TextureRegion(helpImage, 0, 0, 320, 480); }
From source file:app.badlogicgames.superjumper.HelpScreen2.java
License:Apache License
public HelpScreen2(Game game) { this.game = game; guiCam = new OrthographicCamera(320, 480); guiCam.position.set(320 / 2, 480 / 2, 0); nextBounds = new Rectangle(320 - 64, 0, 64, 64); touchPoint = new Vector3(); batcher = new SpriteBatch(); helpImage = Assets.loadTexture("data/help2.png"); helpRegion = new TextureRegion(helpImage, 0, 0, 320, 480); }
From source file:app.badlogicgames.superjumper.HelpScreen3.java
License:Apache License
public HelpScreen3(Game game) { this.game = game; guiCam = new OrthographicCamera(320, 480); guiCam.position.set(320 / 2, 480 / 2, 0); nextBounds = new Rectangle(320 - 64, 0, 64, 64); touchPoint = new Vector3(); batcher = new SpriteBatch(); helpImage = Assets.loadTexture("data/help3.png"); helpRegion = new TextureRegion(helpImage, 0, 0, 320, 480); }
From source file:app.badlogicgames.superjumper.HelpScreen4.java
License:Apache License
public HelpScreen4(Game game) { this.game = game; guiCam = new OrthographicCamera(320, 480); guiCam.position.set(320 / 2, 480 / 2, 0); nextBounds = new Rectangle(320 - 64, 0, 64, 64); touchPoint = new Vector3(); batcher = new SpriteBatch(); helpImage = Assets.loadTexture("data/help4.png"); helpRegion = new TextureRegion(helpImage, 0, 0, 320, 480); }
From source file:app.badlogicgames.superjumper.HelpScreen5.java
License:Apache License
public HelpScreen5(Game game) { this.game = game; guiCam = new OrthographicCamera(320, 480); guiCam.position.set(320 / 2, 480 / 2, 0); nextBounds = new Rectangle(320 - 64, 0, 64, 64); touchPoint = new Vector3(); batcher = new SpriteBatch(); helpImage = Assets.loadTexture("data/help5.png"); helpRegion = new TextureRegion(helpImage, 0, 0, 320, 480); }
From source file:app.badlogicgames.superjumper.HighscoresScreen.java
License:Apache License
public HighscoresScreen(Game game) { this.game = game; guiCam = new OrthographicCamera(320, 480); guiCam.position.set(320 / 2, 480 / 2, 0); backBounds = new Rectangle(0, 0, 64, 64); touchPoint = new Vector3(); batcher = new SpriteBatch(); highScores = new String[5]; for (int i = 0; i < 5; i++) { highScores[i] = i + 1 + ". " + Settings.highscores[i]; xOffset = Math.max(Assets.font.getBounds(highScores[i]).width, xOffset); }/* ww w . ja v a 2 s . com*/ xOffset = 160 - xOffset / 2 + Assets.font.getSpaceWidth() / 2; }
From source file:app.badlogicgames.superjumper.MainMenuScreen.java
License:Apache License
public MainMenuScreen(Game game) { this.game = game; guiCam = new OrthographicCamera(320, 480); guiCam.position.set(320 / 2, 480 / 2, 0); batcher = new SpriteBatch(); soundBounds = new Rectangle(0, 0, 64, 64); playBounds = new Rectangle(160 - 150, 200 + 18, 300, 36); highscoresBounds = new Rectangle(160 - 150, 200 - 18, 300, 36); helpBounds = new Rectangle(160 - 150, 200 - 18 - 36, 300, 36); multiplayerBounds = new Rectangle(160 - 64, 100, 128, 32); touchPoint = new Vector3(); }
From source file:app.badlogicgames.superjumper.multiplayer.MultiplayerGameScreen.java
License:Apache License
public MultiplayerGameScreen(Game game, StartMultiplayerScreen prevScreen) { this.game = game; this.prevScreen = prevScreen; state = GAME_RUNNING;//from w w w . ja v a 2 s . c om guiCam = new OrthographicCamera(320, 480); guiCam.position.set(320 / 2, 480 / 2, 0); touchPoint = new Vector3(); batcher = new SpriteBatch(); worldListener = new WorldListener() { @Override public void jump() { Assets.playSound(Assets.jumpSound); } @Override public void highJump() { Assets.playSound(Assets.highJumpSound); } @Override public void hit() { Assets.playSound(Assets.hitSound); } @Override public void coin() { Assets.playSound(Assets.coinSound); } }; world = new World(worldListener); renderer = new WorldRenderer(batcher, world); pauseBounds = new Rectangle(320 - 64, 480 - 64, 64, 64); resumeBounds = new Rectangle(160 - 96, 240, 192, 36); quitBounds = new Rectangle(160 - 96, 240 - 36, 192, 36); lastScore = 0; scoreString = "SCORE: 0"; WarpController.getInstance().setListener(this); }
From source file:app.badlogicgames.superjumper.multiplayer.StartMultiplayerScreen.java
License:Apache License
public StartMultiplayerScreen(Game game) { this.game = game; guiCam = new OrthographicCamera(320, 480); guiCam.position.set(320 / 2, 480 / 2, 0); backBounds = new Rectangle(0, 0, 64, 64); touchPoint = new Vector3(); batcher = new SpriteBatch(); xOffset = 80;//from w w w . j a v a 2 s . c o m WarpController.getInstance().setListener(this); }