@Override public void write (Json json) { json.writeValue("data", data, ObjectMap.class); json.writeValue("indices", assets.toArray(), int[].class); }
@Override public void write (Json json) { json.writeValue("data", data, ObjectMap.class); json.writeValue("indices", assets.toArray(), int[].class); }
/** Creates an animated tile with the given animation intervals and frame tiles. * * @param intervals The intervals between each individual frame tile in milliseconds. * @param frameTiles An array of {@link StaticTiledMapTile}s that make up the animation. */ public AnimatedTiledMapTile (IntArray intervals, Array<StaticTiledMapTile> frameTiles) { this.frameTiles = new StaticTiledMapTile[frameTiles.size]; this.frameCount = frameTiles.size; this.animationIntervals = intervals.toArray(); this.loopDuration = 0; for (int i = 0; i < intervals.size; ++i) { this.frameTiles[i] = frameTiles.get(i); this.loopDuration += intervals.get(i); } }
/** Creates an animated tile with the given animation intervals and frame tiles. * * @param intervals The intervals between each individual frame tile in milliseconds. * @param frameTiles An array of {@link StaticTiledMapTile}s that make up the animation. */ public AnimatedTiledMapTile (IntArray intervals, Array<StaticTiledMapTile> frameTiles) { this.frameTiles = new StaticTiledMapTile[frameTiles.size]; this.frameCount = frameTiles.size; this.animationIntervals = intervals.toArray(); this.loopDuration = 0; for (int i = 0; i < intervals.size; ++i) { this.frameTiles[i] = frameTiles.get(i); this.loopDuration += intervals.get(i); } }
@Override public void write (Json json) { json.writeValue("data", data, ObjectMap.class); json.writeValue("indices", assets.toArray(), int[].class); }
/** Creates an animated tile with the given animation intervals and frame tiles. * * @param intervals The intervals between each individual frame tile in milliseconds. * @param frameTiles An array of {@link StaticTiledMapTile}s that make up the animation. */ public AnimatedTiledMapTile (IntArray intervals, Array<StaticTiledMapTile> frameTiles) { this.frameTiles = new StaticTiledMapTile[frameTiles.size]; this.frameCount = frameTiles.size; this.animationIntervals = intervals.toArray(); this.loopDuration = 0; for (int i = 0; i < intervals.size; ++i) { this.frameTiles[i] = frameTiles.get(i); this.loopDuration += intervals.get(i); } }
public int[] keyArray() { return keys().toArray().toArray(); }