Far-Out/src/com/sagi/dayan/Games/Elements/Background.java

20 lines
491 B
Java
Raw Normal View History

2016-02-27 20:45:32 +00:00
package com.sagi.dayan.Games.Elements;
/**
2016-03-20 21:21:31 +00:00
* Represents background for the game
2016-02-27 20:45:32 +00:00
*/
public class Background extends Sprite {
public Background(int x, int y, int w, int h, int acc, String imgName, double angle, int sWidth, int sHeight) {
super(x, y, w, h, acc, imgName, angle, sWidth, sHeight);
locX = 0;
locY = pHeight - sHeight;
}
@Override
public void update() {
locY += acceleration;
if(locY >= 0)
locY = 0;
}
}