mirror of
https://github.com/MartinKral/Slash-The-Hordes
synced 2024-12-26 03:38:58 +00:00
Do not turn player graphics if the x axis did not change
This commit is contained in:
parent
5bb00aacf9
commit
7e6486775f
@ -91,9 +91,9 @@ export class Player extends Component {
|
||||
this.animation.play("Move");
|
||||
}
|
||||
|
||||
if (movement.x <= 0) {
|
||||
if (movement.x < 0) {
|
||||
this.playerGraphics.setScale(new Vec3(1, 1, 1));
|
||||
} else {
|
||||
} else if (0 < movement.x) {
|
||||
this.playerGraphics.setScale(new Vec3(-1, 1, 1));
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user