Package com.badlogic.gdx.graphics.g2d

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


  public Director()
  {
    scene = null;

    // This required Graphics context.
    spriteBatch = new SpriteBatch();

    // Director maintains event source.
    eventSource = new ActorEventSource();

    // These are scale factors for adjusting touch events to the actual size
View Full Code Here


   * used to avoid creating a new SpriteBatch (which can be somewhat slow) if multiple stages are used during an applications
   * life time.
   * @param batch Will not be disposed if {@link #dispose()} is called. Handle disposal yourself. */
  public Stage (float width, float height, boolean keepAspectRatio, SpriteBatch batch) {
    ownsBatch = batch == null;
    this.batch = ownsBatch ? new SpriteBatch() : batch;

    this.width = width;
    this.height = height;

    root = new Group();
View Full Code Here

   * @see com.badlogic.gdx.ApplicationListener#create()
   */
  @Override
  public void create() {

        batch = new SpriteBatch();
        font = new BitmapFont(Gdx.files.internal("ui/default.fnt"));
    setScreen(new SplashScreen(this));
  }
View Full Code Here

   * @param batch Will not be disposed if {@link #dispose()} is called. Handle disposal yourself. */
  public Stage (Viewport viewport, Batch batch) {
    this.viewport = viewport;

    ownsBatch = batch == null;
    this.batch = ownsBatch ? new SpriteBatch() : batch;

    root = new Group();
    root.setStage(this);

    viewport.update(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), true);
View Full Code Here

    boolean drawVelocities) {
    // 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 Sprite bgImage; // BOZO - Add setting background image to UI.

    public void create () {
      if (spriteBatch != null) return;

      spriteBatch = new SpriteBatch();

      worldCamera = new OrthographicCamera();
      textCamera = new OrthographicCamera();

      pixelsPerMeter = new NumericValue();
View Full Code Here

    SpriteBatch batch;
    BitmapFont font;

    @Override
    public void create () {
      batch = new SpriteBatch();
      changeFont();
    }
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

    public void create () {
      if (spriteBatch != null) return;

      Texture.setEnforcePotImages(false);

      spriteBatch = new SpriteBatch();

      worldCamera = new OrthographicCamera();
      textCamera = new OrthographicCamera();

      pixelsPerMeter = new NumericValue();
View Full Code Here

    SpriteBatch batch;
    BitmapFont font;

    @Override
    public void create () {
      batch = new SpriteBatch();
      changeFont();
    }
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.