diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2018-06-28 16:24:06 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2018-06-28 16:24:06 +0200 |
commit | afa5db087cb0fc28223712cfc4ac4612504bdd69 (patch) | |
tree | 8575070b58c49ecae2f1a43fb0dae919f2df4c3d /core/src/ch/asynk/zproject/Board.java | |
parent | dd3232a74ab4b5f0d353d717cf3f080a73528a6e (diff) | |
download | gdx-boardgame-afa5db087cb0fc28223712cfc4ac4612504bdd69.zip gdx-boardgame-afa5db087cb0fc28223712cfc4ac4612504bdd69.tar.gz |
implement GameScreen and GameCamera
Diffstat (limited to 'core/src/ch/asynk/zproject/Board.java')
-rw-r--r-- | core/src/ch/asynk/zproject/Board.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/core/src/ch/asynk/zproject/Board.java b/core/src/ch/asynk/zproject/Board.java new file mode 100644 index 0000000..a9badbd --- /dev/null +++ b/core/src/ch/asynk/zproject/Board.java @@ -0,0 +1,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() + { + this.map = new Texture("data/map_00.png"); + } + + @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); + } +} |