提交 fda0e840 编写于 作者: T Tim Petricola

Fix win/over in local

上级 664546ef
......@@ -118,9 +118,11 @@ HTMLActuator.prototype.updateBestScore = function (bestScore) {
HTMLActuator.prototype.message = function (won) {
var type = won ? "game-won" : "game-over";
var message = won ? "You win!" : "Game over!"
var message = won ? "You win!" : "Game over!";
if (ga) ga("send", "event", "game", "end", type, this.score);
if (typeof ga !== "undefined") {
ga("send", "event", "game", "end", type, this.score);
}
this.messageContainer.classList.add(type);
this.messageContainer.getElementsByTagName("p")[0].textContent = message;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册