/** * @param urn The two-part uri for asset ("module:assetName") * @return The requested texture, or null if it doesn't exist */ public static Optional<Texture> getTexture(String urn) { return get(urn, Texture.class); }
/** * Used on initializing the game environment, either for playing or for running unit tests */ public static void initNativeLibs() { initLibraryPaths(); }
/** * Parametrized constructor. * * @param id The ID to assign to the widget */ public UIText(String id) { super(id); cursorTexture = Assets.getTexture("engine:white").get(); }
public Mesh build() { return Assets.generateAsset(meshData, Mesh.class); }
@Override public Optional<?> deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { return Assets.getTextureRegion(json.getAsString()); } }
@Override public Prefab getFromString(String representation) { if (representation == null) { return null; } return Assets.getPrefab(representation).orElse(null); } }
/** * @param urn The two-part uri for asset ("module:assetName") * @return The requested texture, or null if it doesn't exist */ public static Optional<Texture> getTexture(ResourceUrn urn) { return get(urn, Texture.class); }
/** * Default constructor. */ public UIText() { cursorTexture = Assets.getTexture("engine:white").get(); }
public Mesh build(ResourceUrn urn) { return Assets.generateAsset(urn, meshData, Mesh.class); }
/** * @param simpleUri The two-part uri for asset ("module:assetName") * @return The requested music, or null if it doesn't exist */ public static Optional<StreamingSound> getMusic(String simpleUri) { return get(simpleUri, StreamingSound.class); } //
/** * @param simpleUri The two-part uri for asset ("module:assetName") * @return The requested mesh, or null if it doesn't exist */ public static Optional<Mesh> getMesh(String simpleUri) { return get(simpleUri, Mesh.class); } //
/** * @param simpleUri The two-part uri for asset ("module:assetName") * @return The requested material, or null if it doesn't exist */ public static Optional<Material> getMaterial(String simpleUri) { return get(simpleUri, Material.class); }
/** * @param simpleUri The two-part uri for asset ("module:assetName") * @return The requested shader, or null if it doesn't exist */ public static Optional<Shader> getShader(String simpleUri) { return get(simpleUri, Shader.class); } //
/** * @param simpleUri The two-part uri for asset ("module:assetName") * @return The requested font, or null if it doesn't exist */ public static Optional<Font> getFont(String simpleUri) { return get(simpleUri, Font.class); } //
/** * @param simpleUri The two-part uri for asset ("module:assetName") * @return The requested sound, or null if it doesn't exist */ public static Optional<StaticSound> getSound(String simpleUri) { return get(simpleUri, StaticSound.class); } //
public static Optional<UIElement> getUIElement(String uri) { return get(uri, UIElement.class); }
public static Optional<Prefab> getPrefab(String simpleUri) { return get(simpleUri, Prefab.class); }
public static Optional<UISkin> getSkin(String uri) { return get(uri, UISkin.class); }