38 lines
686 B
Java
38 lines
686 B
Java
package ei.engine.test;
|
|
|
|
import ei.engine.LWJGLGameWindow;
|
|
import ei.engine.math.Vector2f;
|
|
import ei.engine.scene.Box;
|
|
|
|
public class EngineTest extends LWJGLGameWindow{
|
|
private Box box;
|
|
private float pos;
|
|
|
|
public static void main(String[] args){
|
|
new EngineTest();
|
|
}
|
|
|
|
public EngineTest() {
|
|
super("EngineTest");
|
|
}
|
|
|
|
protected void init(){
|
|
box = new Box("lol");
|
|
box.setSize(new Vector2f(100,100));
|
|
pos = 0;
|
|
}
|
|
|
|
protected void update() {
|
|
super.update();
|
|
pos += 0.2f;
|
|
box.setLocation(new Vector2f(200+pos,200+pos));
|
|
box.update();
|
|
}
|
|
|
|
/**
|
|
* this method shid be overriden
|
|
*/
|
|
protected void render(){
|
|
box.render();
|
|
}
|
|
}
|