Newer
Older
JumpingGame / src / main / java / views / TileRenderer.java
package views;

import entities.Sprite;
import models.IModel;

//---------------------------------------------------------------
// タイルの描画
public class TileRenderer implements IView {
    private Sprite sprite;

    //---------------------------------------------------------------
    //---------------------------------------------------------------
    public TileRenderer(String path, double scale){
        this.sprite = new Sprite(path);
        this.sprite.setScaleValue(scale);
    }

    //---------------------------------------------------------------
    //---------------------------------------------------------------
    //
    public void display(IModel model){
        sprite.draw();
    }

    //---------------------------------------------------------------
    // テクスチャの開放
    public void delete(){
        sprite.delete();
    }
    //---------------------------------------------------------------
}