add hero walk graphics, objects atlas packing and refactor components to be records
This commit is contained in:
@@ -1,20 +1,29 @@
|
||||
package io.github.com.quillraven.util;
|
||||
|
||||
import com.badlogic.gdx.tools.texturepacker.TexturePacker;
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* Utility class to execute LibGDX's TextureAtlas packer tool.
|
||||
* This tool packs multiple images into a single texture atlas.
|
||||
*/
|
||||
public class TexturePackerTool {
|
||||
public static void main(String[] args) {
|
||||
// packMap();
|
||||
packObjects();
|
||||
System.out.println("Texture packing completed successfully!");
|
||||
}
|
||||
|
||||
private static void packObjects() {
|
||||
String inputDir = "assets_raw/objects";
|
||||
String outputDir = "assets/graphics";
|
||||
String packFileName = "objects";
|
||||
|
||||
System.out.println("Packing textures from " + inputDir + " to " + outputDir + "/" + packFileName);
|
||||
TexturePacker.process(inputDir, outputDir, packFileName);
|
||||
}
|
||||
|
||||
private static void packMap() {
|
||||
String inputDir = "assets_raw/map";
|
||||
String outputDir = "assets/maps";
|
||||
String packFileName = "tileset";
|
||||
|
||||
System.out.println("Packing textures from " + inputDir + " to " + outputDir + "/" + packFileName);
|
||||
TexturePacker.process(inputDir, outputDir, packFileName);
|
||||
System.out.println("Texture packing completed successfully!");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user