summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b1f7738)
raw | patch | inline | side by side (parent: b1f7738)
author | fredboy <fredboy@protonmail.com> | |
Mon, 22 Apr 2024 08:44:43 +0000 (15:44 +0700) | ||
committer | fredboy <fredboy@protonmail.com> | |
Mon, 22 Apr 2024 09:00:46 +0000 (16:00 +0700) |
android/assets/textures/items/iron_axe.png | patch | blob | history | |
core/src/ru/deadsoftware/cavedroid/game/mobs/Player.java | patch | blob | history |
diff --git a/android/assets/textures/items/iron_axe.png b/android/assets/textures/items/iron_axe.png
index 2fd16d0919456edf70812d6563e82bd0cfc8f2a6..52113da22bc8347f5b785fb537f06d9382865b41 100644 (file)
Binary files a/android/assets/textures/items/iron_axe.png and b/android/assets/textures/items/iron_axe.png differ
Binary files a/android/assets/textures/items/iron_axe.png and b/android/assets/textures/items/iron_axe.png differ
diff --git a/core/src/ru/deadsoftware/cavedroid/game/mobs/Player.java b/core/src/ru/deadsoftware/cavedroid/game/mobs/Player.java
index 34a936daaa6aaaca19524ab9f66f2f6f56351654..7f517df7b1ead5f070110a3ad7c50c1863f425ef 100644 (file)
float rotate = anim + 30;
+ if (item.isTool()) {
+ sprite.rotate90(looksLeft());
+ }
+
final float itemX = x + handLength * MathUtils.sin(handMultiplier * anim * MathUtils.degRad) + xOffset;
final float itemY = y + handLength * MathUtils.cos(handMultiplier * anim * MathUtils.degRad) + yOffset;
if (looksLeft()) {
- sprite.setFlip(true, sprite.isFlipY());
+ sprite.setFlip(!item.isTool(), sprite.isFlipY());
SpriteUtilsKt.applyOrigin(sprite, spriteOrigin.getFlipped(true, false));
} else {
- sprite.setFlip(false, sprite.isFlipY());
+ sprite.setFlip(item.isTool(), sprite.isFlipY());
SpriteUtilsKt.applyOrigin(sprite, spriteOrigin);
}
sprite.setFlip(false, sprite.isFlipY());
sprite.setRotation(0);
sprite.setOriginCenter();
+ sprite.rotate90(looksRight());
}
public void startHitting() {