From 8621e07e3c6aeb5171ba49d987477fe2bc661983 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Tue, 9 Dec 2014 14:01:40 +0100 Subject: [PATCH] Feature: Prototype for Fscking hardcore mode background. --- .../background/FuckedUpCloudBackground.java | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/de/teamteamteam/spacescooter/background/FuckedUpCloudBackground.java diff --git a/src/de/teamteamteam/spacescooter/background/FuckedUpCloudBackground.java b/src/de/teamteamteam/spacescooter/background/FuckedUpCloudBackground.java new file mode 100644 index 0000000..a636c16 --- /dev/null +++ b/src/de/teamteamteam/spacescooter/background/FuckedUpCloudBackground.java @@ -0,0 +1,38 @@ +package de.teamteamteam.spacescooter.background; + +import java.awt.Graphics2D; + +import de.teamteamteam.spacescooter.brain.GameConfig; + +public class FuckedUpCloudBackground extends ScrollingBackground { + + private double x; + private double x_delta; + private int percentage; + private int timer; + + public FuckedUpCloudBackground(int x, int y) { + super(x, y); + this.setImage("images/cloudbackground.png"); + this.setScrollingSpeed(-1); + } + + public void paint(Graphics2D g) { + g.fillRect(0, 0, GameConfig.windowWidth, GameConfig.windowHeight); + /*if(this.timer == 0 && this.percentage < 100) { + this.percentage++; + } else if (timer > 500 && this.percentage > 0) { + this.percentage--; + } else if (this.percentage == 100){ + this.timer++; + } else if (this.percentage == 0) { + this.timer--; + }*/ + this.x += 0.005; + + + g.rotate(this.x, GameConfig.windowWidth/2, GameConfig.windowHeight/2); + super.paint(g); + } + +}