Add performance
This commit is contained in:
parent
69577a9f6a
commit
aabe5b12f4
11 changed files with 212 additions and 38 deletions
|
@ -5,13 +5,18 @@ import world.*;
|
|||
public class Game {
|
||||
|
||||
private World world;
|
||||
private int update = 0;
|
||||
|
||||
public Game(){
|
||||
world= new World(0);
|
||||
}
|
||||
|
||||
public void update(){
|
||||
world.update();
|
||||
if(update >= 2){
|
||||
world.update();
|
||||
update = 0;
|
||||
}
|
||||
update++;
|
||||
}
|
||||
|
||||
public void render(){
|
||||
|
|
Reference in a new issue