mirror of
https://github.com/MistWeatherMedia/WeatherSTAR-3000-Java.git
synced 2026-11-28 14:38:08 -08:00
35 lines
649 B
Java
35 lines
649 B
Java
package components;
|
|
|
|
import org.joml.Vector2f;
|
|
|
|
import renderer.Texture;
|
|
|
|
public class Sprite {
|
|
private Texture texture;
|
|
private Vector2f[] texCoords;
|
|
|
|
public Sprite(Texture texture) {
|
|
this.texture = texture;
|
|
Vector2f[] texCoords = {
|
|
new Vector2f(1,0),
|
|
new Vector2f(1,1),
|
|
new Vector2f(0,1),
|
|
new Vector2f(0,0)
|
|
};
|
|
this.texCoords = texCoords;
|
|
}
|
|
|
|
public Sprite(Texture texture, Vector2f[] texCoords) {
|
|
this.texture = texture;
|
|
this.texCoords = texCoords;
|
|
}
|
|
|
|
public Texture getTexture() {
|
|
return this.texture;
|
|
}
|
|
|
|
public Vector2f[] getTexCoords() {
|
|
return this.texCoords;
|
|
}
|
|
}
|