Version jouable
This commit is contained in:
parent
6b55748eef
commit
ec64df0eec
23 changed files with 332 additions and 138 deletions
|
@ -6,13 +6,16 @@ import globalgamejam.tiles.ObjetTile;
|
|||
import globalgamejam.tiles.Tile;
|
||||
|
||||
public class Objet extends PhysicalEntity {
|
||||
|
||||
|
||||
private EObjetType type;
|
||||
private final Tile tile;
|
||||
|
||||
public Objet(String texturePath, float x, float y, float sizeRadius, float speed, float xVelocity, float yVelocity, float frictionFactor){
|
||||
super(x, y, sizeRadius, speed, xVelocity, yVelocity, frictionFactor);
|
||||
public Objet(String texturePath, float x, float y, float speed, float xVelocity, float yVelocity, float frictionFactor){
|
||||
super(x, y, 0, 0, speed, xVelocity, yVelocity, frictionFactor);
|
||||
|
||||
this.tile = new ObjetTile(texturePath, x, y);
|
||||
|
||||
this.setSizeXY(this.tile.getTexture().width, this.tile.getTexture().height);
|
||||
}
|
||||
|
||||
public Tile getTile(){
|
||||
|
@ -29,4 +32,14 @@ public class Objet extends PhysicalEntity {
|
|||
public String toString(){
|
||||
return "x : " + this.x + ", y : " + this.y;
|
||||
}
|
||||
|
||||
public EObjetType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(EObjetType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Reference in a new issue