v1.1
This commit is contained in:
parent
de8b0708c7
commit
bcaa063263
4 changed files with 50 additions and 24 deletions
|
@ -25,7 +25,7 @@ public class Player extends PhysicalEntity {
|
|||
super(x, y, 0, 0, 3, 0, 0, 10);
|
||||
this.tile = new PlayerTile(path, x, y);
|
||||
|
||||
this.setSizeXY(this.tile.getTexture().width, this.tile.getTexture().height);
|
||||
this.setSizeXY(this.tile.getTexture().width, this.tile.getTexture().width);
|
||||
|
||||
this.longueurBalai = 82;
|
||||
|
||||
|
@ -50,6 +50,21 @@ public class Player extends PhysicalEntity {
|
|||
this.brosse.addPosition(x, y);
|
||||
}
|
||||
|
||||
/* @Override
|
||||
public boolean collideWithMur(PhysicalEntity entity){
|
||||
float distX = this.x - entity.getX();
|
||||
float distY = this.y - entity.getY();
|
||||
|
||||
float dist = (float)Math.sqrt( distX * distX + distY * distY );
|
||||
|
||||
return dist <= this.sizeRadius + entity.sizeRadius;
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public void resolveCollideWith(PhysicalEntity entity){
|
||||
|
||||
}
|
||||
|
||||
public void rotate(float angleRotation){
|
||||
this.angle += angleRotation;
|
||||
this.angle %= 360;
|
||||
|
|
Reference in a new issue