public void update() { triggerHandler.update(); player.update(map); camera.update(player.GetPosX(), player.GetPosY()); map.update(camera); highScore.update(camera); updatePlayerFallDeath(); }
private void load(String path) throws FileNotFoundException, IOException, ClassNotFoundException { this.path = path; ObjectInputStream ois = new ObjectInputStream(new FileInputStream(path)); Editor editor = (Editor) ois.readObject(); map = new Map(editor.getMap(), false); triggerHandler = new TriggerHandler(this, map.getTriggerEntityManager()); player = new Player(inputHandler); player.setLocation(editor.GetPlayerLocation()); camera.pos_y = 0; ois.close(); start(); }