summaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/de/romjaki/pluggabledino/assets.kt2
-rw-r--r--src/main/kotlin/de/romjaki/pluggabledino/states/GameState.kt1
2 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) {