以下是 html5制作3D拳击游戏源码下载 的示例演示效果:
部分效果截图:
HTML代码(index.html):
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Type" content="text/html;">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta charset="utf-8">
<meta name="description" content="game for iPhone">
<meta name="keywords" content="iPhone,Androig,iPad,game,html5 game,sports,boxing,boxing game,action game,3d,punch,Flash,Flash for iPhone,html5,iPod touch,iPad">
<meta name="viewport" id="viewport" content="width = device-width, initial-scale = 1, minimum-scale = 1, maximum-scale = 1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta equiv="Expires" content="0">
<title>html5制作3D拳击游戏源码下载 </title>
<style type="text/css">
body {
-webkit-user-select: none;
margin:0px;
background:#000;
}
</style>
<script language="javascript" type="text/javascript" src="js/a.js"></script>
<script type="text/javascript" src="js/gm14.min.js"></script>
</head>
<body onorientationchange="rtalt()" style="-webkit-transform-origin: 0px 0px 0px; ">
<div id="chf2" style="position:relative;width:320px;margin:0 auto;"><canvas id="gcvs" width="320" height="416"></canvas></div>
</body>
</html>
JS代码(a.js):
function a_init(){
updateShare(0);
}
function goHome(){
window.location.href ='http://game.024qianzheng.cn';
}
function a_submitScore(score){
updateShareScore(score);
//setTimeout( function(){
show_share();
}
,1000 )}
function updateShare(bestScore){
imgUrl = 'http://game.024qianzheng.cn/3dboxing/3dboxingicon.png';
lineLink = 'http://game.024qianzheng.cn/3dboxing/3dboxing.htm';
descContent = "各位选手快来争夺拳王宝座吧!";
updateShareScore(bestScore);
appid = '';
}
function updateShareScore(bestScore){
if(bestScore > 0){
shareTitle = "我在《3D拳王》挑战得了" + bestScore + "分,你打得过我吗?";
}
else{
shareTitle = "真3D!《3D拳王》冠军争霸已经开始!";
}
}