From 457dcbf7c2f7e0188fa08ae13aef699bf5b2a282 Mon Sep 17 00:00:00 2001 From: Damien Date: Fri, 14 May 2021 10:37:40 +0200 Subject: [PATCH] remise des autres fleches --- core/src/sagittarius/model/Arrow.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/sagittarius/model/Arrow.java b/core/src/sagittarius/model/Arrow.java index a790b21..73c0f5a 100644 --- a/core/src/sagittarius/model/Arrow.java +++ b/core/src/sagittarius/model/Arrow.java @@ -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);