Newer
Older
JumpingGame / src / main / java / views / BackgroundRenderer.java
k-fujii on 30 Nov 2021 1 KB 背景を追加
package views;

import entities.Pair;
import models.IModel;

//---------------------------------------------------------------
//
public class BackgroundRenderer implements IView {

    private Sprite sprite;

    //---------------------------------------------------------------
    //---------------------------------------------------------------
    //
    public BackgroundRenderer(String path) {
        this.sprite = new Sprite(path);
        this.sprite.setScaleValue(1);
        this.sprite.setPositionValue(new Pair<>(640d, 480d));
    }

    //---------------------------------------------------------------
    //---------------------------------------------------------------
    //
    @Override
    public void update(IModel model) {
    }

    //---------------------------------------------------------------
    //
    @Override
    public void display() {
        sprite.draw();
    }

    //---------------------------------------------------------------
    //
    @Override
    public void delete() {
        sprite.delete();
    }
}