com.badlogic.gdx.utils.viewport.ExtendViewport Java Examples

The following examples show how to use com.badlogic.gdx.utils.viewport.ExtendViewport. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Level.java    From ud406 with MIT License 6 votes vote down vote up
public Level() {
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    gigaGal = new GigaGal(new Vector2(50, 50), this);
    platforms = new Array<Platform>();
    enemies = new DelayedRemovalArray<Enemy>();
    bullets = new DelayedRemovalArray<Bullet>();
    explosions = new DelayedRemovalArray<Explosion>();
    powerups = new DelayedRemovalArray<Powerup>();
    exitPortal = new ExitPortal(new Vector2(200, 200));

    gameOver = false;
    victory = false;
    score = 0;


}
 
Example #2
Source File: IciclesScreen.java    From ud405 with MIT License 6 votes vote down vote up
@Override
public void show() {
    iciclesViewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    renderer = new ShapeRenderer();
    renderer.setAutoShapeType(true);

    hudViewport = new ScreenViewport();
    batch = new SpriteBatch();

    font = new BitmapFont();
    font.getRegion().getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);

    player = new Player(iciclesViewport);
    // TODO: Initialize icicles with the difficulty
    icicles = new Icicles(iciclesViewport);

    topScore = 0;
}
 
Example #3
Source File: Level.java    From ud406 with MIT License 6 votes vote down vote up
public Level() {
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    gigaGal = new GigaGal(new Vector2(50, 50), this);
    platforms = new Array<Platform>();
    enemies = new DelayedRemovalArray<Enemy>();
    bullets = new DelayedRemovalArray<Bullet>();
    explosions = new DelayedRemovalArray<Explosion>();
    powerups = new DelayedRemovalArray<Powerup>();
    exitPortal = new ExitPortal(new Vector2(200, 200));

    gameOver = false;
    victory = false;
    score = 0;


}
 
Example #4
Source File: Level.java    From ud406 with MIT License 6 votes vote down vote up
public Level() {
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    gigaGal = new GigaGal(new Vector2(50, 50), this);
    platforms = new Array<Platform>();
    enemies = new DelayedRemovalArray<Enemy>();
    bullets = new DelayedRemovalArray<Bullet>();
    explosions = new DelayedRemovalArray<Explosion>();
    powerups = new DelayedRemovalArray<Powerup>();
    exitPortal = new ExitPortal(new Vector2(200, 200));

    gameOver = false;
    victory = false;
    score = 0;


}
 
Example #5
Source File: IciclesScreen.java    From ud405 with MIT License 6 votes vote down vote up
@Override
public void show() {
    iciclesViewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    renderer = new ShapeRenderer();
    renderer.setAutoShapeType(true);

    // TODO: Initialize the HUD viewport
    hudViewport = new ScreenViewport();

    // TODO: Initialize the SpriteBatch
    batch = new SpriteBatch();

    // TODO: Initialize the BitmapFont
    font = new BitmapFont();

    // TODO: Give the font a linear TextureFilter
    font.getRegion().getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);

    player = new Player(iciclesViewport);
    icicles = new Icicles(iciclesViewport);

    // TODO: Set top score to zero
    topScore = 0;
}
 
Example #6
Source File: Level.java    From ud406 with MIT License 6 votes vote down vote up
public Level() {
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    gigaGal = new GigaGal(new Vector2(50, 50), this);
    platforms = new Array<Platform>();
    enemies = new DelayedRemovalArray<Enemy>();
    bullets = new DelayedRemovalArray<Bullet>();
    explosions = new DelayedRemovalArray<Explosion>();
    powerups = new DelayedRemovalArray<Powerup>();
    exitPortal = new ExitPortal(new Vector2(200, 200));

    gameOver = false;
    victory = false;
    score = 0;


}
 
Example #7
Source File: IciclesScreen.java    From ud405 with MIT License 6 votes vote down vote up
@Override
public void show() {
    iciclesViewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    renderer = new ShapeRenderer();
    renderer.setAutoShapeType(true);

    hudViewport = new ScreenViewport();
    batch = new SpriteBatch();

    font = new BitmapFont();
    font.getRegion().getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);

    player = new Player(iciclesViewport);
    icicles = new Icicles(iciclesViewport, difficulty);

    Gdx.input.setInputProcessor(this);

    topScore = 0;
}
 
Example #8
Source File: Level.java    From ud406 with MIT License 6 votes vote down vote up
public Level() {
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    gigaGal = new GigaGal(new Vector2(50, 50), this);
    platforms = new Array<Platform>();
    enemies = new DelayedRemovalArray<Enemy>();
    bullets = new DelayedRemovalArray<Bullet>();
    explosions = new DelayedRemovalArray<Explosion>();
    powerups = new DelayedRemovalArray<Powerup>();
    exitPortal = new ExitPortal(new Vector2(200, 200));

    gameOver = false;
    victory = false;
    score = 0;


}
 
Example #9
Source File: Level.java    From ud406 with MIT License 6 votes vote down vote up
public Level() {
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    gigaGal = new GigaGal(new Vector2(50, 50), this);
    platforms = new Array<Platform>();
    enemies = new DelayedRemovalArray<Enemy>();
    bullets = new DelayedRemovalArray<Bullet>();
    explosions = new DelayedRemovalArray<Explosion>();
    powerups = new DelayedRemovalArray<Powerup>();
    exitPortal = new ExitPortal(new Vector2(200, 200));

    gameOver = false;
    victory = false;
    score = 0;


}
 
Example #10
Source File: GameplayScreen.java    From ud406 with MIT License 6 votes vote down vote up
@Override
    public void show() {
        AssetManager am = new AssetManager();
        Assets.instance.init(am);

        batch = new SpriteBatch();
        gameplayViewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

        // TODO: Comment out the debug level
//        level = new Level(gameplayViewport);
//        level.initializeDebugLevel();

        // TODO: Ask the LevelLoader to load Level1
        level = LevelLoader.load("Level1", gameplayViewport);
        chaseCam = new ChaseCam(gameplayViewport.getCamera(), level.getGigaGal());
    }
 
Example #11
Source File: Level.java    From ud406 with MIT License 6 votes vote down vote up
public Level() {
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    gigaGal = new GigaGal(new Vector2(50, 50), this);
    platforms = new Array<Platform>();
    enemies = new DelayedRemovalArray<Enemy>();
    bullets = new DelayedRemovalArray<Bullet>();
    explosions = new DelayedRemovalArray<Explosion>();
    powerups = new DelayedRemovalArray<Powerup>();
    exitPortal = new ExitPortal(new Vector2(200, 200));

    gameOver = false;
    victory = false;
    score = 0;


}
 
Example #12
Source File: IciclesScreen.java    From ud405 with MIT License 6 votes vote down vote up
@Override
public void show() {
    iciclesViewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    renderer = new ShapeRenderer();
    renderer.setAutoShapeType(true);

    hudViewport = new ScreenViewport();
    batch = new SpriteBatch();

    font = new BitmapFont();
    font.getRegion().getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);

    player = new Player(iciclesViewport);
    icicles = new Icicles(iciclesViewport, difficulty);

    Gdx.input.setInputProcessor(this);

    topScore = 0;
}
 
Example #13
Source File: Level.java    From ud406 with MIT License 6 votes vote down vote up
public Level() {
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    gigaGal = new GigaGal(new Vector2(50, 50), this);
    platforms = new Array<Platform>();
    enemies = new DelayedRemovalArray<Enemy>();
    bullets = new DelayedRemovalArray<Bullet>();
    explosions = new DelayedRemovalArray<Explosion>();
    powerups = new DelayedRemovalArray<Powerup>();
    exitPortal = new ExitPortal(new Vector2(200, 200));

    gameOver = false;
    victory = false;
    score = 0;


}
 
Example #14
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);
    level = new Level();
    batch = new SpriteBatch();
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    // TODO: Initialize chaseCam, getting the Camera from the Viewport and GigaGal from the Level

}
 
Example #15
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);

    batch = new SpriteBatch();
    gameplayViewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    level = new Level(gameplayViewport);

    chaseCam = new ChaseCam(gameplayViewport.getCamera(), level.getGigaGal());
}
 
Example #16
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);

    batch = new SpriteBatch();
    gameplayViewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    level = new Level(gameplayViewport);

    chaseCam = new ChaseCam(gameplayViewport.getCamera(), level.getGigaGal());
}
 
Example #17
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);

    batch = new SpriteBatch();
    gameplayViewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    level = new Level(gameplayViewport);

    chaseCam = new ChaseCam(gameplayViewport.getCamera(), level.getGigaGal());
}
 
Example #18
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);

    batch = new SpriteBatch();
    gameplayViewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    level = new Level(gameplayViewport);

    chaseCam = new ChaseCam(gameplayViewport.getCamera(), level.getGigaGal());
}
 
Example #19
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);
    level = new Level();
    batch = new SpriteBatch();
    renderer = new ShapeRenderer();
    renderer.setAutoShapeType(true);
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);
}
 
Example #20
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);

    // TODO: Initialize Level
    level = new Level();
    batch = new SpriteBatch();
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);
}
 
Example #21
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);

    batch = new SpriteBatch();
    gameplayViewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    level = new Level(gameplayViewport);

    chaseCam = new ChaseCam(gameplayViewport.getCamera(), level.getGigaGal());
}
 
Example #22
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);
    level = new Level();
    batch = new SpriteBatch();
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);
}
 
Example #23
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);

    batch = new SpriteBatch();
    gameplayViewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    level = new Level(gameplayViewport);

    chaseCam = new ChaseCam(gameplayViewport.getCamera(), level.getGigaGal());
}
 
Example #24
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);
    level = new Level();
    batch = new SpriteBatch();
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);
}
 
Example #25
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);
    level = new Level();
    batch = new SpriteBatch();
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);
}
 
Example #26
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);

    batch = new SpriteBatch();
    gameplayViewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    level = new Level(gameplayViewport);

    chaseCam = new ChaseCam(gameplayViewport.getCamera(), level.getGigaGal());
}
 
Example #27
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);
    level = new Level();
    batch = new SpriteBatch();
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);
}
 
Example #28
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);

    batch = new SpriteBatch();
    gameplayViewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

    level = new Level(gameplayViewport);

    chaseCam = new ChaseCam(gameplayViewport.getCamera(), level.getGigaGal());
}
 
Example #29
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
    public void show() {
        AssetManager am = new AssetManager();
        Assets.instance.init(am);

        batch = new SpriteBatch();
        gameplayViewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);

//        level = new Level(gameplayViewport);
//        level.initializeDebugLevel();

        level = LevelLoader.load("Level1", gameplayViewport);
        chaseCam = new ChaseCam(gameplayViewport.getCamera(), level.getGigaGal());
    }
 
Example #30
Source File: GameplayScreen.java    From ud406 with MIT License 5 votes vote down vote up
@Override
public void show() {
    AssetManager am = new AssetManager();
    Assets.instance.init(am);
    level = new Level();
    batch = new SpriteBatch();
    viewport = new ExtendViewport(Constants.WORLD_SIZE, Constants.WORLD_SIZE);
}