summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorromangraef <romangraef@loves.dicksinhisan.us>2018-08-05 19:50:15 +0200
committerromangraef <romangraef@loves.dicksinhisan.us>2018-08-05 19:50:15 +0200
commitbba3d38c8c50431a3cfa999cc4b492434d8c676a (patch)
treeea396868c130c76717573ec3ebdd8ec506c39e89 /src
parent558dd3b92818566976043f750c4b3f2f34f2d17f (diff)
downloadpluggabledino-bba3d38c8c50431a3cfa999cc4b492434d8c676a.tar.gz
pluggabledino-bba3d38c8c50431a3cfa999cc4b492434d8c676a.tar.bz2
pluggabledino-bba3d38c8c50431a3cfa999cc4b492434d8c676a.zip
background
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/de/romjaki/pluggabledino/assets.kt2
-rw-r--r--src/main/kotlin/de/romjaki/pluggabledino/states/GameState.kt1
-rw-r--r--src/main/resources/images/background.pngbin0 -> 113860 bytes
3 files changed, 3 insertions, 0 deletions
diff --git a/src/main/kotlin/de/romjaki/pluggabledino/assets.kt b/src/main/kotlin/de/romjaki/pluggabledino/assets.kt
index 5c12b35..dc5b9d0 100644
--- a/src/main/kotlin/de/romjaki/pluggabledino/assets.kt
+++ b/src/main/kotlin/de/romjaki/pluggabledino/assets.kt
@@ -27,3 +27,5 @@ val cactusImg = Image(TextureLoader.getTexture("PNG", FileInputStream("assets/im
val BirdImg = Image(TextureLoader.getTexture("PNG", FileInputStream("assets/images/bird1.png")))
val anthemSound = Music(FileInputStream("assets/audio/anthem.ogg"), "anthem.ogg")
+
+val background = Image(TextureLoader.getTexture("PNG", FileInputStream("assets/images/background.png")))
diff --git a/src/main/kotlin/de/romjaki/pluggabledino/states/GameState.kt b/src/main/kotlin/de/romjaki/pluggabledino/states/GameState.kt
index fd868a9..205446b 100644
--- a/src/main/kotlin/de/romjaki/pluggabledino/states/GameState.kt
+++ b/src/main/kotlin/de/romjaki/pluggabledino/states/GameState.kt
@@ -64,6 +64,7 @@ class GameState : BasicGameState() {
g.background = Color.red
}
g.color = Color.green
+ g.drawImage(background, 0f, 0f)
g.drawImage(dinoAnimated.currentFrame, world.dino.position.x * WIDTH / 50, world.dino.position.y * HEIGHT / 50 - dinoAnimated.height)
g.drawImage(groundline, 0f, HEIGHT * 39 / 50f)
for (cactus in world.cacti) {
diff --git a/src/main/resources/images/background.png b/src/main/resources/images/background.png
new file mode 100644
index 0000000..902e3c0
--- /dev/null
+++ b/src/main/resources/images/background.png
Binary files differ