Skip to content

Commit

Permalink
Fixed Health State issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrannofloresrex committed Mar 15, 2021
1 parent a74ad6e commit eba7af9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 5 additions & 1 deletion public/assets/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function loadSong(song_index) {
// Load a new song
selectedSong.src = playlist[song_index].path;
selectedSong.load();
// Tried selectedSong.play()



Expand Down Expand Up @@ -94,4 +95,7 @@ function playpauseSong() {
// percentage of the volume slider set
selectedSong.volume = volume_slider.value / 100;
}
loadSong(song_index)
loadSong(song_index)
// Tried playSong(),
// Tried window.onload.playSong()
// Tried window.onload = playSong()
1 change: 1 addition & 0 deletions src/features/level/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ function Level(props) {
return (
<div className="level">
<h2 id="level">Level: {props.level}</h2>
<h2 id= "health">Health: {props.health}</h2>
</div>
)
}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ function Game() {
question3: false,
encounter: 0,
id: res.data._id,
token: token
token: token,
health: res.data.health
}
})
}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/newgame.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ function NewGame() {
password: "",
token: "",
level: 0,
health: 0,
id: "",
isLoggedIn: false,
health: 0
isLoggedIn: false
}
});
userAlreadyExists()
Expand Down

0 comments on commit eba7af9

Please sign in to comment.