diff options
author | elioat <{ID}+{username}@users.noreply.github.com> | 2024-12-09 10:35:06 -0500 |
---|---|---|
committer | elioat <{ID}+{username}@users.noreply.github.com> | 2024-12-09 10:35:06 -0500 |
commit | 012c8f7e62ad28d649eedef3591afc57232254c6 (patch) | |
tree | 9cb4f535ed58cd0331b52fe176ce82a1859d2524 /html/plains/game.js | |
parent | 5ae28337d0beb3a265aa8431c91253ca37debe70 (diff) | |
download | tour-012c8f7e62ad28d649eedef3591afc57232254c6.tar.gz |
*
Diffstat (limited to 'html/plains/game.js')
-rw-r--r-- | html/plains/game.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/html/plains/game.js b/html/plains/game.js index 4b7b138..6054455 100644 --- a/html/plains/game.js +++ b/html/plains/game.js @@ -2,7 +2,7 @@ const CONFIG = { player: { size: 30, speed: 5, - sprintMultiplier: 1.5, + sprintMultiplier: 2, color: '#111' }, sword: { @@ -138,8 +138,7 @@ const updatePlayer = () => { state.footprints.push(createFootprint( state.player.x + perpX, state.player.y + perpY, - Math.atan2(dy, dx), - currentSpeed + Math.atan2(dy, dx) )); state.lastFootprintTime = animationTime; } @@ -187,7 +186,7 @@ const createParticle = (x, y, angle) => ({ size: 2 + Math.random() * 2 }); -const createFootprint = (x, y, direction, speed) => ({ +const createFootprint = (x, y, direction) => ({ x, y, direction, @@ -301,7 +300,7 @@ const renderPlayer = () => { ctx.beginPath(); ctx.arc(state.player.x, state.player.y, CONFIG.player.size / 2, 0, Math.PI * 2); ctx.strokeStyle = CONFIG.sword.colors.secondary; - ctx.lineWidth = 5; + ctx.lineWidth = 3; ctx.stroke(); ctx.beginPath(); @@ -316,7 +315,6 @@ const renderPlayer = () => { const rotationSpeed = CONFIG.defense.rotationSpeed; for (let i = 0; i < numParticles; i++) { - const particleSpeed = 0.15 + Math.sin(animationTime * 0.002 + i) * 0.03; const radialOffset = Math.sin(animationTime * 0.002 + i * 0.5) * 4; const orbitRadius = baseOrbitRadius + radialOffset; |