summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/zproject/Board.java
blob: 0e4cfb9f00f6a27401e4928e79a3ba9b8810e8f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package ch.asynk.zproject;

import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.utils.Disposable;

public class Board implements Disposable
{
    private final Texture map;

    public Board(final Assets assets)
    {
        this.map = assets.getTexture(assets.MAP_00);
    }

    @Override public void dispose()
    {
        map.dispose();
    }

    public int getWidth()
    {
        return map.getWidth();
    }

    public int getHeight()
    {
        return map.getHeight();
    }

    public void draw(SpriteBatch batch, Rectangle viewPort)
    {
        batch.draw(map, 0, 0);
    }
}