diff options
author | romangraef <romangraef@loves.dicksinhisan.us> | 2018-08-05 19:50:15 +0200 |
---|---|---|
committer | romangraef <romangraef@loves.dicksinhisan.us> | 2018-08-05 19:50:15 +0200 |
commit | bba3d38c8c50431a3cfa999cc4b492434d8c676a (patch) | |
tree | ea396868c130c76717573ec3ebdd8ec506c39e89 /src/main/kotlin/de/romjaki | |
parent | 558dd3b92818566976043f750c4b3f2f34f2d17f (diff) | |
download | pluggabledino-bba3d38c8c50431a3cfa999cc4b492434d8c676a.tar.gz pluggabledino-bba3d38c8c50431a3cfa999cc4b492434d8c676a.tar.bz2 pluggabledino-bba3d38c8c50431a3cfa999cc4b492434d8c676a.zip |
background
Diffstat (limited to 'src/main/kotlin/de/romjaki')
-rw-r--r-- | src/main/kotlin/de/romjaki/pluggabledino/assets.kt | 2 | ||||
-rw-r--r-- | src/main/kotlin/de/romjaki/pluggabledino/states/GameState.kt | 1 |
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) { |