formatting
This commit is contained in:
43
Powerup.java
43
Powerup.java
@@ -1,23 +1,24 @@
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
public class Powerup extends Collectable{
|
||||
int yVelo, xVelo, id;
|
||||
boolean onGround;
|
||||
|
||||
public Powerup(int x, int y, int w, int h, int id){
|
||||
super(x,y,w,h,new ImageIcon("Sprites/Powerup" + id + ".png"));
|
||||
xVelo = 0; yVelo = -7;
|
||||
onGround = false;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void moveX(int moveX){
|
||||
this.x += moveX;
|
||||
this.rect.x = this.x;
|
||||
}
|
||||
|
||||
public void moveY(int moveY){
|
||||
this.y += moveY;
|
||||
this.rect.y = this.y;
|
||||
}
|
||||
}
|
||||
public class Powerup extends Collectable {
|
||||
int yVelo, xVelo, id;
|
||||
boolean onGround;
|
||||
|
||||
public Powerup(int x, int y, int w, int h, int id) {
|
||||
super(x, y, w, h, new ImageIcon("Sprites/Powerup" + id + ".png"));
|
||||
xVelo = 0;
|
||||
yVelo = -7;
|
||||
onGround = false;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void moveX(int moveX) {
|
||||
this.x += moveX;
|
||||
this.rect.x = this.x;
|
||||
}
|
||||
|
||||
public void moveY(int moveY) {
|
||||
this.y += moveY;
|
||||
this.rect.y = this.y;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user