mirror of
https://github.com/MartinKral/Slash-The-Hordes
synced 2024-12-25 19:28:53 +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");
|
this.animation.play("Move");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (movement.x <= 0) {
|
if (movement.x < 0) {
|
||||||
this.playerGraphics.setScale(new Vec3(1, 1, 1));
|
this.playerGraphics.setScale(new Vec3(1, 1, 1));
|
||||||
} else {
|
} else if (0 < movement.x) {
|
||||||
this.playerGraphics.setScale(new Vec3(-1, 1, 1));
|
this.playerGraphics.setScale(new Vec3(-1, 1, 1));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user