| 1 | package g0803.bindingofshiba.view.game; | |
| 2 | ||
| 3 | import g0803.bindingofshiba.App; | |
| 4 | import g0803.bindingofshiba.bundles.Bundle; | |
| 5 | import g0803.bindingofshiba.events.IEventManager; | |
| 6 | import g0803.bindingofshiba.gui.GUI; | |
| 7 | import g0803.bindingofshiba.math.Vec2D; | |
| 8 | import g0803.bindingofshiba.model.game.elements.Obstacle; | |
| 9 | import g0803.bindingofshiba.textures.ITexture; | |
| 10 | import g0803.bindingofshiba.view.View; | |
| 11 | ||
| 12 | public class ObstacleView extends View<Obstacle> { | |
| 13 | ||
| 14 | public ObstacleView(Obstacle model, IEventManager eventManager) { | |
| 15 | super(model, eventManager); | |
| 16 | } | |
| 17 | ||
| 18 | @Override | |
| 19 | public void draw(App app, GUI gui, Vec2D offset) { | |
| 20 | Bundle<ITexture> textures = app.getTextures(); | |
| 21 | Vec2D position = getModel().getPosition().add(offset).round(); | |
| 22 | ||
| 23 |
1
1. draw : removed call to g0803/bindingofshiba/gui/GUI::blit → KILLED |
gui.blit((int) position.getX(), (int) position.getY(), textures.get("rock")); |
| 24 | } | |
| 25 | } | |
Mutations | ||
| 23 |
1.1 |