Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package paxdevgame;
- public class Background {
- private int bgX, bgY, speedX;
- 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;
- }
- public Background (int x, int y){
- bgX = x;
- bgY = y;
- speedX = 0;
- }
- public void update() {
- bgX += speedX;
- if (bgX <= -2160){
- bgX += 4320;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement