List of usage examples for com.badlogic.gdx.graphics.glutils ShapeRenderer ShapeRenderer
public ShapeRenderer()
From source file:com.worms.object.AbstractObject.java
public AbstractObject(Vector2 position, float width, float height) { this.position = position; this.width = width; this.height = height; this.shapeRenderer = new ShapeRenderer(); }
From source file:com.worms.object.bomb.Bomb.java
private void init() { shapeRenderer = new ShapeRenderer(); }
From source file:com.worms.screen.AbstractScreen.java
private void init() { createCamera();/*from ww w. ja va 2s . c o m*/ stage = new Stage(new StretchViewport(Constants.SCREEN_WIDTH * Constants.SCALE, Constants.SCREEN_HEIGHT * Constants.SCALE, camera)); shapeRenderer = new ShapeRenderer(); Gdx.input.setInputProcessor(stage); }
From source file:com.xemplar.games.android.nerdshooter.screens.GameScreen.java
License:Open Source License
public GameScreen(String pack, int level) { gameTicks = 0L;/*from ww w.j a v a2s . c o m*/ instance = this; levelNum = level; packName = pack; tex = new Texture(Gdx.files.internal("scatt.png")); font = NerdShooter.text; font.setColor(1, 1, 1, 1); if (level == -1) { GameScreen.useGameDebugRenderer = true; } else { GameScreen.useGameDebugRenderer = false; } controlLeft = NerdShooter.atlas.findRegion("HUDLeft"); controlRight = NerdShooter.atlas.findRegion("HUDRight"); controlUp = NerdShooter.atlas.findRegion("HUDJump"); world = new World(pack, level); jaxon = world.getJaxon(); controller = jaxon.getController(); button = new ShapeRenderer(); batch = new SpriteBatch(); left = new Rectangle(); right = new Rectangle(); jump = new Rectangle(); fire = new Rectangle(); sanic = new Rectangle(); }
From source file:com.ygames.game.Boss.java
public Boss(int x, int y, int w, int h, GameScreen g) { game = g;/*from w ww . j a va 2 s . c o m*/ posX = x * w; posY = y * h; spawnTime = 0; width = 140; height = 140; //anime=new Animation(); box = new Rectangle(); top = new Rectangle(); bound = new Rectangle(); speedX = 0; speedY = 0; health = 100; shape = new ShapeRenderer(); isFinal = false; }
From source file:com.ygames.game.Enemy.java
public Enemy(int x, int y, int w, int h, GameScreen g) { game = g;//from ww w.j a v a2 s. com posX = x * w; posY = y * h; speedX = -1; speedY = 0; width = w; height = h; //anime = new Animation(); r = new Rectangle(); left = new Rectangle(); right = new Rectangle(); movLeft = true; movRight = false; s = new ShapeRenderer(); }
From source file:com.ygames.game.Player.java
public Player(final GameScreen g, Game ga) { jump = Gdx.audio.newSound(Gdx.files.internal("Music/Jump.wav")); game = g;/*w w w . j av a 2 s . c o m*/ gam = ga; posX = 0; posY = 0; health = 100; speedX = 0; speedY = 0; ladderspeed = 0; movleft = false; movright = false; shape = new ShapeRenderer(); width = 70; height = 70; Box = new Rectangle(); top = new Rectangle(); bot = new Rectangle(); left = new Rectangle(); right = new Rectangle(); isAlive = true; isJumped = true; isOnGround = false; isOnLadder = false; up = true; //anime = new Animation(); }
From source file:com.ygames.game.Projectile.java
public Projectile(int x, int y, int px, int py, Game game) { posX = x;/* w ww . j a va2 s .c o m*/ posY = y; playerX = px; playerY = py; this.game = game; width = 50; height = 20; speedX = 0; speedY = 0; timetolive = 500; r = new Rectangle(posX, posY, width, height); box = new Rectangle(posX - 50, posY - 50, width + 100, height + 100); shape = new ShapeRenderer(); }
From source file:core.september.pushathon.workers.BatchRenderer.java
License:Apache License
protected void init() { batch = new SpriteBatch(); shape = new ShapeRenderer(); camera = new OrthographicCamera(Constants.VIEWPORT_WIDTH, Constants.VIEWPORT_HEIGHT); //camera.setToOrtho(true); }
From source file:de.fgerbig.spacepeng.screens.SplashScreen.java
License:Open Source License
@Override public void show() { super.show(); // load the splash image and create the texture region splashTexture = new Texture(Assets.SPLASH_IMAGE); // we set the linear texture filter to improve the stretching splashTexture.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear); shapeRenderer = new ShapeRenderer(); }