Package com.badlogic.gdx.utils

Examples of com.badlogic.gdx.utils.Array


  public void clearDebugRectangles (TableLayout layout) {
    if (layout.debugRects != null) layout.debugRects.clear();
  }

  public void addDebugRectangle (TableLayout layout, int type, int x, int y, int w, int h) {
    if (layout.debugRects == null) layout.debugRects = new Array();
    layout.debugRects.add(new DebugRect(type, x, y, w, h));
  }
View Full Code Here


  @Override
  public Array<AssetDescriptor> getDependencies (String fileName, FileHandle file, ParticleEffectParameter param) {
    Array<AssetDescriptor> deps = null;
    if (param != null && param.atlasFile != null) {
      deps = new Array();
      deps.add(new AssetDescriptor<TextureAtlas>(param.atlasFile, TextureAtlas.class));
    }
    return deps;
  }
View Full Code Here

  private final Array<ParticleEmitter> emitters;
  private BoundingBox bounds;
  private boolean ownsTexture;

  public ParticleEffect () {
    emitters = new Array(8);
  }
View Full Code Here

  public ParticleEffect () {
    emitters = new Array(8);
  }

  public ParticleEffect (ParticleEffect effect) {
    emitters = new Array(true, effect.emitters.size);
    for (int i = 0, n = effect.emitters.size; i < n; i++)
      emitters.add(new ParticleEmitter(effect.emitters.get(i)));
  }
View Full Code Here

    static private Application app;
    static private ImmediateModeRenderer debugRenderer;

    static public void addRectangle (Table table, Debug type, float x, float y, float w, float h) {
      draw = true;
      if (table.debugRects == null) table.debugRects = new Array();
      table.debugRects.add(new DebugRect(type, x, table.getHeight() - y, w, h));
    }
View Full Code Here

    DebugRect.pool.freeAll(debugRects);
    debugRects.clear();
  }

  private void addDebugRect (float x, float y, float w, float h, Color color) {
    if (debugRects == null) debugRects = new Array();
    DebugRect rect = DebugRect.pool.obtain();
    rect.color = color;
    rect.set(x, getHeight() - y - h, w, h);
    debugRects.add(rect);
  }
View Full Code Here

        }
        return propertySet;
    }

    private void parseArray(JsonValue jsonValue, PropertySet propertySet) {
        Array array = new Array();
        for(JsonValue valueMap = jsonValue.child(); valueMap != null; valueMap = valueMap.next()) {
            array.add(valueMap.asString());
        }
        propertySet.put(jsonValue.name(), array);
    }
View Full Code Here

  }

  /** Returns all regions with the specified name, ordered by smallest to largest {@link AtlasRegion#index index}. This method
   * uses string comparison to find the regions, so the result should be cached rather than calling this method multiple times. */
  public Array<AtlasRegion> findRegions (String name) {
    Array<AtlasRegion> matched = new Array();
    for (int i = 0, n = regions.size; i < n; i++) {
      AtlasRegion region = regions.get(i);
      if (region.name.equals(name)) matched.add(new AtlasRegion(region));
    }
    return matched;
  }
View Full Code Here

  /** Returns all regions in the atlas as sprites. This method creates a new sprite for each region, so the result should be
   * stored rather than calling this method multiple times.
   * @see #createSprite(String) */
  public Array<Sprite> createSprites () {
    Array sprites = new Array(regions.size);
    for (int i = 0, n = regions.size; i < n; i++)
      sprites.add(newSprite(regions.get(i)));
    return sprites;
  }
View Full Code Here

  /** Returns all regions with the specified name as sprites, ordered by smallest to largest {@link AtlasRegion#index index}. This
   * method uses string comparison to find the regions and constructs new sprites, so the result should be cached rather than
   * calling this method multiple times.
   * @see #createSprite(String) */
  public Array<Sprite> createSprites (String name) {
    Array<Sprite> matched = new Array();
    for (int i = 0, n = regions.size; i < n; i++) {
      AtlasRegion region = regions.get(i);
      if (region.name.equals(name)) matched.add(newSprite(region));
    }
    return matched;
  }
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.utils.Array

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.