一款简单好玩的html5 canvas激流勇进迷宫逃生小游戏代码,可以在线玩,也可以下载研究。游戏玩法:使用左键、右键和上箭头键移动。
js代码
<script src="game.js"></script>
<script>
window.onload = function () {
var height = document.documentElement.clientHeight;
var kbBox = document.getElementById("kbBox");
var top = height - 400;
console.log(top);
kbBox.setAttribute("style","height:"+top/2+"px");
var startGameId = document.getElementById("startGame");
var enterGameId = document.getElementById("enterGame");
var gameId = document.getElementById("gameId");
enterGameId.onclick = function () {
gameId.setAttribute("style","display:block");
startGameId.setAttribute("style","display:none");
Loop();
}
}
</script>
系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791