Permalink
Cannot retrieve contributors at this time
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?
GameNoodle/src/game/level/Level.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
53 lines (41 sloc)
854 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} | |
} |