passage de l'arrow0 en 32x32

This commit is contained in:
Damien 2021-05-14 10:01:17 +02:00
parent ad4b9ffb99
commit 19881f9ae5
3 changed files with 3 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -43,8 +43,8 @@ public class Arrow extends EntityQuad {
super(0, 1, shooter.getColor(), shooter.getPosition());
this.velocity = new Vector2(power, 0).setAngleDeg(angle);
this.acceleration = new Vector2();
this.setOrigin(80, 2);
this.setSize(100, 4);
this.setOrigin(40, 2);
this.setSize(50, 4);
this.force = computeForce();
this.landed = false;
@ -108,7 +108,7 @@ public class Arrow extends EntityQuad {
@Override
public void draw(Batch batch, float parentAlpha) {
batch.draw(texture, getPosition().x - 0.8f * getWidth(), getPosition().y - getHeight()/2 - 10, 0.8f * this.getWidth(), this.getHeight()/2 + 10, getWidth(), 20 + getHeight(),
batch.draw(texture, getPosition().x - getOriginX(), getPosition().y - getWidth()/2, getOriginX(), getWidth()/2, getWidth(), getWidth(),
1, 1, getRotation(), 0, 0, texture.getWidth(), texture.getHeight(), false, false);
super.draw(batch, parentAlpha);
}