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