Skip to content
Permalink
3720964c8f
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
53 lines (41 sloc) 854 Bytes
package game.level;
import game.entity.Player;
import game.graphics.Shader;
import game.graphics.Texture;
import game.graphics.VertexArray;
public class Level {
// number of tiles
// private int width, height;
private Player player;
public Level() {
float[] vertices = new float[] {
-10.0f, -10.0f * 9.0f / 16.0f, 0.0f,
-10.0f, 10.0f * 9.0f / 16.0f, 0.0f,
0.0f, 10.0f * 9.0f / 16.0f, 0.0f,
0.0f, -10.0f * 9.0f / 16.0f, 0.0f,
};
byte[] indices = new byte[] {
0, 1, 2,
2, 3, 0
};
float[] tcs = new float[] {
0, 1,
0, 0,
1, 0,
1, 1
};
player = new Player();
}
public void update() {
// tile update
// player update
// enemy update
player.update();
}
public void render() {
// render tiles
// render player
// render other entities
player.render();
}
}