Projectile move added

master
Jonathan Hager 5 years ago
parent b314df5677
commit 5d7efe4ddf

@ -46,7 +46,7 @@ public class Controller extends ApplicationAdapter implements InputProcessor {
wallTimer.scheduleTask(new Timer.Task() {
@Override
public void run() {
// TODO: Implement timertask
model.timerStep();
}
}, 0, 1f);
font = new BitmapFont();
@ -90,6 +90,14 @@ public class Controller extends ApplicationAdapter implements InputProcessor {
renderer.dispose();
}
public void timerStart(){
wallTimer.start();
}
public void timerStop(){
wallTimer.stop();
}
@Override
public boolean keyDown(int keycode) {
return false;

@ -8,15 +8,22 @@ import java.util.ArrayList;
public class Model {
private Monster monster;
private ArrayList<Wall> walls;
private ArrayList<Projectile> projectiles;
public Model(){
monster = new Monster(250,150);
walls = new ArrayList<>();
walls.add(new PermWall(20,new Rectangle(250,250,50,25)));
projectiles = new ArrayList<>();
}
public void timerStep(){
monster.move();
for(Projectile projectile : projectiles){
projectile.move();
}
}
public ArrayList<Wall> getWalls(){

Loading…
Cancel
Save