Skip to content

Commit ccd7d0d

Browse files
committed
Animated NPC when they are standing still
Added standing still sprites for NPC
1 parent 0767824 commit ccd7d0d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

res/sprite_sheet.png

926 Bytes
Loading

src/com/redomar/game/entities/Dummy.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ public void render(Screen screen) {
4949

5050
if (movingDir == 1) {
5151
xTile += 2;
52+
if (!isMoving || swim.isActive(swimType)){
53+
yTile -= 2;
54+
}
55+
} else if (movingDir == 0 && !isMoving || movingDir == 0 && swim.isActive(swimType)) {
56+
yTile -= 2;
5257
} else if (movingDir > 1) {
5358
xTile += 4 + ((numSteps >> walkingSpeed) & 1) * 2;
5459
flipTop = (movingDir - 1) % 2;

0 commit comments

Comments
 (0)