Back to project page SnowLand.
The source code is released under:
GNU General Public License
If you think the Android project SnowLand listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.walrus.game; // www .j a v a 2s . c o m public class Background { private int bgX, bgY, speedX; public Background(int x, int y){ bgX = x; bgY = y; speedX = 0; } public void update() { bgX += speedX; if (bgX <= -2160){ bgX += 4320; } } public int getBgX() { return bgX; } public int getBgY() { return bgY; } public int getSpeedX() { return speedX; } public void setBgX(int bgX) { this.bgX = bgX; } public void setBgY(int bgY) { this.bgY = bgY; } public void setSpeedX(int speedX) { this.speedX = speedX; } }