Skip to content
Permalink
5d348e1b9a
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
42 lines (31 sloc) 734 Bytes
package game.level.tiles;
import game.graphics.Texture;
import game.graphics.VertexArray;
public abstract class Tile {
protected final float SIZE = 1.0f;
protected Texture texture;
protected VertexArray vertexArray;
protected float[] vertices;
protected byte[] indices;
protected float[] textureCoords;
protected Tile() {
vertices = new float[] {
-SIZE / 2.0f, -SIZE / 2.0f, 0.0f,
-SIZE / 2.0f, SIZE / 2.0f, 0.0f,
SIZE / 2.0f, SIZE / 2.0f, 0.0f,
SIZE / 2.0f, -SIZE / 2.0f, 0.0f,
};
indices = new byte[] {
0, 1, 2,
2, 3, 0
};
textureCoords = new float[] {
0, 1,
0, 0,
1, 0,
1, 1
};
}
public abstract void update();
public abstract void render();
}