Skip to content

Commit e3346c0

Browse files
committed
Merge branch 'npc-dev' into aside
2 parents 21dfb47 + 6452d6f commit e3346c0

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ public void move(int xa, int ya) {
3636
return;
3737
}
3838
numSteps++;
39+
40+
//Moving Directions
41+
//0 = Facing UP
42+
//1 = Facing Down
43+
//2 = Facing Left
44+
//3 = Facing Right
45+
3946
if (!hasCollided(xa, ya)) {
4047
if (ya < 0) {
4148
movingDir = 0;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ public void render(Screen screen) {
100100
} else if (movingDir > 1) {
101101
xTile += 4 + ((numSteps >> walkingSpeed) & 1) * 2;
102102
flipTop = (movingDir - 1) % 2;
103+
if(!isMoving){
104+
xTile = 4;
105+
}
103106
}
104107

105108
int modifier = 8 * scale;

0 commit comments

Comments
 (0)