package views; import entities.Image2D; import entities.Pair; import entities.Texture; //--------------------------------------------------------------- // public class PlayerRenderer implements IView { private Texture texture; private Image2D img; //--------------------------------------------------------------- //--------------------------------------------------------------- // public PlayerRenderer(String path, Pair<Double> position) { texture = new Texture("player", path); img = new Image2D(texture, position.getFirst(), position.getSecond()); } //--------------------------------------------------------------- //--------------------------------------------------------------- // public void display() { img.draw(); } //--------------------------------------------------------------- // テクスチャの開放 public void delete(){ texture.delete(); } //--------------------------------------------------------------- }