Skip to content
Snippets Groups Projects
Commit 1c782ce6 authored by Magnus Segtnan Skjølberg's avatar Magnus Segtnan Skjølberg
Browse files

(#18): add pixels to viewport + scaling to meters

parent 41f0393b
No related branches found
No related tags found
3 merge requests!51Resolve "Adjust cannon angle from touch input",!35Draft: Resolve "Adjust cannon angle from touch input",!32Combine hud with gameplay
......@@ -3,39 +3,20 @@
*/
package com.game.tankwars;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Interpolation;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.physics.box2d.Body;
import com.badlogic.gdx.physics.box2d.Box2DDebugRenderer;
import com.badlogic.gdx.physics.box2d.World;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.ScreenUtils;
import com.game.tankwars.model.Box2dWorld;
import com.game.tankwars.model.Bullet;
import com.game.tankwars.model.Tank;
import com.game.tankwars.view.LoginScreen;
import com.game.tankwars.view.MainMenuScreen;
public class TankWarsGame extends Game {
public static final float SCALE = 10;
public static int VIEWPORT_WIDTH = 80;
public static int VIEWPORT_HEIGHT = 50;
public static final int GAMEPORT_WIDTH = 720;
public static final int GAMEPORT_HEIGHT = 480;
private SpriteBatch batch;
private BitmapFont font;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment