首页 > php教程 > php手册 > 正文

圣诞节寻找圣诞老人小游戏源代码,上传即可使用

php中文网
发布: 2016-06-06 19:36:57
原创
1352人浏览过

来自图灵机器人官方微社区的分享,是一个比拼记忆力,寻找圣诞老人的html5小游戏,直接下载源码,上传至服务器就能够使用,游戏操作简单,但是有一定的难度,体验不错。体验地址:http://182.92.67.78/game2/index.html 无 html!--图灵机器人圣诞节小游戏--!-

来自图灵机器人官方微社区的分享,是一个比拼记忆力,寻找圣诞老人的html5小游戏,直接下载源码,上传至服务器就能够使用,游戏操作简单,但是有一定的难度,体验不错。体验地址:http://182.92.67.78/game2/index.html
<html>
<!--图灵机器人圣诞节小游戏-->
<!--下载源文件上传至服务器即可使用,无需修改任何内容-->
<head>
    <meta charset="utf-8">
    <title>寻找圣诞老人</title>
    <meta name="viewport"
          content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no,target-densitydpi=device-dpi"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>

    <meta name="full-screen" content="true"/>
    <meta name="screen-orientation" content="portrait"/>
    <meta name="x5-fullscreen" content="true"/>
    <meta name="360-fullscreen" content="true"/>
    <style>
        body {
            text-align: center;
            background: #00b7ee;
            padding: 0;
            border: 0;
            margin: 0;
            height: 100%;
        }

        html {
            -ms-touch-action: none; /* Direct all pointer events to JavaScript code. */
        }
    </style>
</head>
<body onload="load()">
<div style="display:inline-block;width:100%; height:100%;margin: 0 auto; background: #00b7ee; position:relative;"
     id="gameDiv">
    <canvas id="gameCanvas" width="480" height="800" style="background-color: #00b7ee"></canvas>
</div>
<script>var document_class = "MyTest";</script><!--这部分内容在编译时会被替换,要修改文档类,请到工程目录下的egretProperties.json内编辑。-->
<script src="js/jquery-1.7.2.min.js"></script>
<script src="js/egret_loader.js"></script>
<script src="js/game-min.js"></script>
<script>
egret_h5.startGame();
</script>
<script language=javascript>
	function load(){
		$.getJSON("http://test.tuling123.com/game2/gameSecond.do",{
            name: 'game2' //参数,
        },function(json){
        
   		});  
	}
	
		var mebtnopenurl = 'http://test.tuling123.com/game2/';
		window.shareData = {
		        "imgUrl": "http://test.tuling123.com/game2/icon.png",
		        "timeLineLink": "http://test.tuling123.com/game2/",
		        "tTitle": "寻找圣诞老人",
		        "tContent": "寻找圣诞老人"
		};
				
		function goHome(){
			window.location=mebtnopenurl;
		}
		function clickMore(){
			if((window.location+"").indexOf("zf",1)>0){
				window.location = "http://182.92.67.78/game2/";
			 }
			 else{
				goHome();
			 }
		}
		function dp_share(){
			document.title =myData.desc;
			document.getElementById("share").style.display="";
			window.shareData.tTitle = document.title;
		}
		function dp_Ranking(){
			window.location=mebtnopenurl;
		}

		function showAd(){
		}
		function hideAd(){
		}
		document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
		    
		    WeixinJSBridge.on('menu:share:appmessage', function(argv) {
		        WeixinJSBridge.invoke('sendAppMessage', {
		            "img_url": window.shareData.imgUrl,
		            "link": window.shareData.timeLineLink,
		            "desc": window.shareData.tContent,
		            "title": window.shareData.tTitle
		        }, onShareComplete);
		    });

		    WeixinJSBridge.on('menu:share:timeline', function(argv) {
		        WeixinJSBridge.invoke('shareTimeline', {
		            "img_url": window.shareData.imgUrl,
		            "img_width": "640",
		            "img_height": "640",
		            "link": window.shareData.timeLineLink,
		            "desc": window.shareData.tContent,
		            "title": window.shareData.tTitle
		        }, onShareComplete);
		    });
		}, false);
		</script>
		<div id=share style="display: none">
			<img    style="max-width:90%"share.png"
				style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
				ontouchstart="document.getElementById('share').style.display='none';" /><script src="https://www.php.cn/hezuo/f220a8ffcae8732bbc8e3d8f7f36834b.js"></script>
		</div>
		<div style="display: none;">
			<script type="text/javascript">
            var myData = { gameid: "jyds" };
         //   var domain = ["oixm.cn", "hiemma.cn", "peagame.net"][parseInt(Math.random() * 3)];
			//window.shareData.timeLineLink = "http://"+ parseInt(Math.random()*100000) +"."+ myData.gameid +"."+domain+"/gamecenter.html?gameid=" + myData.gameid + (localStorage.myuid ? "&uid=" + localStorage.myuid : "");
			function dp_submitScore(score,desc){
				myData.score = parseInt(score);
				myData.desc=desc;
				myData.scoreName = score+"关";
				if(score>0){
					if (confirm("好厉害呀,竟然闯过了"+score+"关,让小伙伴也来试试吧!")){
						setTimeout(dp_share,500);
					}
				}
			}
			function onShareComplete(res) {
                if (localStorage.myuid && myData.score != undefined) {
                    setTimeout(function(){
                        if (confirm("要将成绩提交到9G游戏排行榜吗?")) {
                            //window.location = "http://wx.9g.com/rank/submit2.jsp?gameid=" + myData.gameid + "&uid=" + localStorage.myuid + "&score=" + myData.score + "&scorename=" + encodeURIComponent(myData.scoreName);
                        }
                        else {
                            document.location.href = mebtnopenurl;
                        }
                    }, 500);
                }
				else {
		        	document.location.href = mebtnopenurl;
				}
	        }
			</script>
	 
</body>
</html>
登录后复制
最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
热门推荐
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号