Endgame WS messages & docs
This commit is contained in:
@ -22,9 +22,6 @@
|
||||
<h1 class="mt-1 mb-2">
|
||||
FairHopper Visualisation Client
|
||||
</h1>
|
||||
<button type="button" class="btn btn-primary test-button">
|
||||
Launch demo modal
|
||||
</button>
|
||||
<div id="purchase-container" class="purchase-container d-none">
|
||||
<div class="d-flex header">
|
||||
<h3>
|
||||
@ -68,18 +65,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.querySelector(".test-button").onclick = () => {
|
||||
playerReachedDestination({
|
||||
player: {
|
||||
name: "Pero Perić",
|
||||
move_count: 123,
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -104,6 +104,10 @@ function playerReachedDestination(data) {
|
||||
playerOnDestinationModal.show();
|
||||
}
|
||||
|
||||
function productSelectionTimeout() {
|
||||
playerOnDestinationModal.hide();
|
||||
}
|
||||
|
||||
function productSelectionDone() {
|
||||
playerOnDestinationModal.hide();
|
||||
}
|
||||
@ -127,6 +131,9 @@ function wsConnect() {
|
||||
case "player_reached_destination":
|
||||
playerReachedDestination(wsMessage.data);
|
||||
break;
|
||||
case "product_selection_timeout":
|
||||
productSelectionTimeout();
|
||||
break;
|
||||
case "product_selection_done":
|
||||
productSelectionDone();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user