Skip to content

Commit 50e1b41

Browse files
committed
fixed by seperating up hud elements
1 parent 23dea6d commit 50e1b41

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/scripts/hud.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const elm = document.getElementById('status');
2-
const currentLevelDisplay = document.getElementById('top-right');
3-
const pointsDisplay = currentLevelDisplay.querySelector('.pointHud')
2+
const hudContainer = document.getElementById('top-right');
3+
const currentLevelDisplay = hudContainer.querySelector('.levelHud')
4+
const pointsDisplay = hudContainer.querySelector('.pointHud')
45

56
function showMessage(message){
67
if(elm === null)

src/views/comet.pug

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ block content
99
#hud
1010
#status message
1111
#top-left
12-
#top-right Level: 1
12+
#top-right
13+
.levelHud Level: 1
1314
.pointHud Points: 0
1415
#bottom-left
1516
#bottom-right

0 commit comments

Comments
 (0)