diff --git a/core/assets/player0-1.png b/core/assets/player0-1.png index 9091287..49efa89 100644 Binary files a/core/assets/player0-1.png and b/core/assets/player0-1.png differ diff --git a/core/assets/player0-2.png b/core/assets/player0-2.png index 49efa89..9091287 100644 Binary files a/core/assets/player0-2.png and b/core/assets/player0-2.png differ diff --git a/core/src/sagittarius/model/Player.java b/core/src/sagittarius/model/Player.java index f3b4687..72eb1b1 100644 --- a/core/src/sagittarius/model/Player.java +++ b/core/src/sagittarius/model/Player.java @@ -19,6 +19,7 @@ public class Player extends EntityQuad { private Planet home; private boolean active; private ArrayList texture; + private int T = 0; // ---------- CONSTRUCTORs ---------- @@ -73,8 +74,12 @@ public class Player extends EntityQuad { @Override public void draw(Batch batch, float parentAlpha) { - batch.draw(texture.get(0), getPosition().x - getWidth()/2, getPosition().y - getHeight()/2, getWidth()/2, getHeight()/2, getWidth(), getHeight(), - 1, 1, getRotation(), 0, 0, texture.get(0).getWidth(), texture.get(0).getHeight(), false, false); + T++; + T %= 100; + int i = (int) (T * ((float) texture.size() / 100)); + System.out.println(i); + batch.draw(texture.get(i), getPosition().x - getWidth()/2, getPosition().y - getHeight()/2, getWidth()/2, getHeight()/2, getWidth(), getHeight(), + 1, 1, getRotation(), 0, 0, texture.get(i).getWidth(), texture.get(i).getHeight(), false, false); super.draw(batch, parentAlpha); }