Increase player walk speed from 20 to 40px per tick
This commit is contained in:
@@ -183,7 +183,7 @@ class Game {
|
|||||||
const viewH = world.parentElement.offsetHeight || 300;
|
const viewH = world.parentElement.offsetHeight || 300;
|
||||||
const worldW = world.offsetWidth || viewW * 4;
|
const worldW = world.offsetWidth || viewW * 4;
|
||||||
|
|
||||||
const SPEED = 20; /* px per tick */
|
const SPEED = 40; /* px per tick */
|
||||||
let dx = 0, dy = 0, dir = '';
|
let dx = 0, dy = 0, dir = '';
|
||||||
|
|
||||||
if (this._heldKeys.has('right')) { dx = SPEED; dir = 'right'; }
|
if (this._heldKeys.has('right')) { dx = SPEED; dir = 'right'; }
|
||||||
|
|||||||
Reference in New Issue
Block a user