Package com.badlogic.gdx.graphics.g2d

Examples of com.badlogic.gdx.graphics.g2d.SpriteBatch


  public Stage (float width, float height, boolean stretch) {
    this.width = width;
    this.height = height;
    this.stretch = stretch;
    this.root = new Group("root");
    this.batch = new SpriteBatch();
    this.camera = new OrthographicCamera();
    setViewport(width, height, stretch);
  }
View Full Code Here


  public Box2DDebugRenderer (boolean drawBodies, boolean drawJoints, boolean drawAABBs) {
    // next we setup the immediate mode renderer
    renderer = new ShapeRenderer();

    // next we create a SpriteBatch and a font
    batch = new SpriteBatch();

    mLower = new Vector2();
    mUpper = new Vector2();

    // initialize vertices array
View Full Code Here

    /**
     * @see ApplicationListener#create()
     */
    @Override
    public void create() {
        m_spriteBatch = new SpriteBatch();

        m_stage = new Stage(0, 0, true);

        m_map = null;

View Full Code Here

    weaponSelector = new UIWeaponSelector(texArrow,font,500,0,tank1.getWeapons());
    playerIndicator = new UIText(font,"Player  1",Color.BLACK,380,Skitg.HEIGHT);
    player1score = new UIText(font,"0",Color.BLUE,100,Skitg.HEIGHT);
    player2score = new UIText(font,"0",Color.RED,700,Skitg.HEIGHT);
   
    batch = new SpriteBatch();
  }
View Full Code Here

    halfHeight = height / 2;

    camera = new OrthographicCamera( width, height );
    camera.setToOrtho( true );

    batch = new SpriteBatch();
    batch.setProjectionMatrix( camera.projection );
    batch.setTransformMatrix( camera.view );

    badlogic = ResourceFactory.newSprite( "badlogic.jpg" );
View Full Code Here

   
    camera = new OrthographicCamera();
    camera.setToOrtho(false, Constants.SCREEN_WIDTH, Constants.SCREEN_HEIGHT);
    camera.update();
   
    batch = new SpriteBatch();
    font = new BitmapFont();
   
    setScreen(new MainMenuScreen(this));
  }
View Full Code Here

  /** Creates a stage with a {@link ScalingViewport} set to {@link Scaling#fill}. The stage will use its own {@link Batch} which
   * will be disposed when the stage is disposed. */
  public Stage () {
    this(new ScalingViewport(Scaling.stretch, Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), new OrthographicCamera()),
      new SpriteBatch());
    ownsBatch = true;
  }
View Full Code Here

  }

  /** Creates a stage with the specified viewport. The stage will use its own {@link Batch} which will be disposed when the stage
   * is disposed. */
  public Stage (Viewport viewport) {
    this(viewport, new SpriteBatch());
    ownsBatch = true;
  }
View Full Code Here

    boolean drawVelocities, boolean drawContacts) {
    // next we setup the immediate mode renderer
    renderer = new ShapeRenderer();

    // next we create a SpriteBatch and a font
    batch = new SpriteBatch();

    lower = new Vector2();
    upper = new Vector2();

    // initialize vertices array
View Full Code Here

 
  private ComponentMapper<PositionComponent> pm = ComponentMapper.getFor(PositionComponent.class);
  private ComponentMapper<VisualComponent> vm = ComponentMapper.getFor(VisualComponent.class);
 
  public RenderSystem(OrthographicCamera camera){
    batch = new SpriteBatch();
   
    this.camera = camera;
  }
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.graphics.g2d.SpriteBatch

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.