remise des autres fleches

This commit is contained in:
Damien 2021-05-14 10:37:40 +02:00
parent 58eb1f7136
commit 457dcbf7c2

View file

@ -52,7 +52,7 @@ public class Arrow extends EntityQuad {
if (!preview) {
texture = new ArrayList<>();
String path = "core/assets/arrow" + MathUtils.random(0);
String path = "core/assets/arrow" + MathUtils.random(2);
int i = 0;
while (true) {
@ -121,7 +121,7 @@ public class Arrow extends EntityQuad {
@Override
public void draw(Batch batch, float parentAlpha) {
int i = (int) (TTL * 3) % 4;
int i = (int) (TTL * 3) % texture.size();
batch.draw(texture.get(i), getPosition().x - getOriginX(), getPosition().y - getWidth()/2, getOriginX(), getWidth()/2, getWidth(), getWidth(),
1, 1, getRotation(), 0, 0, texture.get(i).getWidth(), texture.get(i).getHeight(), false, false);
super.draw(batch, parentAlpha);