Correct direction vs orientation

This commit is contained in:
Kim Ravn Hansen
2025-10-04 17:15:56 +02:00
parent 0091a6d9b8
commit 2bf6272291
2 changed files with 4 additions and 4 deletions

View File

@@ -49,7 +49,7 @@ class Player {
return;
}
if (o === Orientation.NORTH) {
this._directionV = new Vector2i(0, 1);
this._directionV = new Vector2i(0, -1);
return;
}
if (o === Orientation.WEST) {
@@ -57,7 +57,7 @@ class Player {
return;
}
if (o === Orientation.SOUTH) {
this._directionV = new Vector2i(0, -1);
this._directionV = new Vector2i(0, 1);
return;
}
}

View File

@@ -6,11 +6,11 @@ export const PI_OVER_TWO = Math.PI / 2;
*/
export const Orientation = {
/** @constant @readonly @type {number} */
WEST: 0,
EAST: 0,
/** @constant @readonly @type {number} */
SOUTH: 1,
/** @constant @readonly @type {number} */
EAST: 2,
WEST: 2,
/** @constant @readonly @type {number} */
NORTH: 3,
};