Move player and NPC higher on screen for better vertical centering
This commit is contained in:
1 parent
1975a5af99
commit
5dff27ae12
1 file changed
+3
-3
@@ -405,7 +405,7 @@ class Game {
|
|||||||
const bub = document.getElementById('player-bubble');
|
const bub = document.getElementById('player-bubble');
|
||||||
if (p) {
|
if (p) {
|
||||||
const cx = viewW / 2 - 16;
|
const cx = viewW / 2 - 16;
|
||||||
const bot = viewH * 0.35;
|
const bot = viewH * 0.45;
|
||||||
p.style.left = cx + 'px';
|
p.style.left = cx + 'px';
|
||||||
p.style.bottom = bot + 'px';
|
p.style.bottom = bot + 'px';
|
||||||
p.className = `map-player walk-${dir}`;
|
p.className = `map-player walk-${dir}`;
|
||||||
@@ -437,7 +437,7 @@ class Game {
|
|||||||
|
|
||||||
_playerScreenOffset() {
|
_playerScreenOffset() {
|
||||||
const {viewW, viewH} = this._getViewport();
|
const {viewW, viewH} = this._getViewport();
|
||||||
return { px: viewW / 2, py: viewH - (viewH * 0.35) - 32 };
|
return { px: viewW / 2, py: viewH - (viewH * 0.45) - 32 };
|
||||||
}
|
}
|
||||||
|
|
||||||
_npcScreenDist() {
|
_npcScreenDist() {
|
||||||
@@ -534,7 +534,7 @@ class Game {
|
|||||||
const bub = document.getElementById('player-bubble');
|
const bub = document.getElementById('player-bubble');
|
||||||
if (p) {
|
if (p) {
|
||||||
const cx = viewW / 2 - 16;
|
const cx = viewW / 2 - 16;
|
||||||
const bot = viewH * 0.35;
|
const bot = viewH * 0.45;
|
||||||
p.style.left = cx + 'px';
|
p.style.left = cx + 'px';
|
||||||
p.style.bottom = bot + 'px';
|
p.style.bottom = bot + 'px';
|
||||||
p.className = 'map-player idle';
|
p.className = 'map-player idle';
|
||||||
|
|||||||
Reference in new issue
Block a user