H5游戏源码分享-密室逃脱小游戏(考验反应能力)

H5游戏源码分享-密室逃脱小游戏(考验反应能力)

预判安全位置,这个需要快速的反应能力

源码

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=480,user-scalable=no,uc-user-scalable=no,target-densitydpi=high-dpi"/>
<script>
function play68_init() {updateShare(0);
}function goHome() {window.location.href = HOME_PATH;
}function play68_submitScore(score) {updateShareScore(score);setTimeout( function() { show_share(); }, 500 );
}function updateShare(bestScore) {imgUrl = './1.jpg';lineLink = 'http://game2.id87.com/mishi/';descContent = "你觉得你反应很快吗?试试就知道!";updateShareScore(bestScore);appid = '';
}function updateShareScore(bestScore) {if(bestScore > 0) {shareTitle = "考反应游戏《密室逃脱》我过了" + bestScore + "关,实在是太变态了!";}else{shareTitle = "变态考反应游戏《密室逃脱》能通关你就能闪子弹了!";}
}
</script>
<script type="text/javascript" src="jsgamemin.js"></script>
<script type="text/javascript" src="spaceman.min.js"></script>
<title>密室逃脱</title>
<style>body{margin:0px; background-color:#434243; color:#6A6A6A;}.bandiv{float:left; width:100%; background-color:#DBD1BB;}.bandiv div{padding:10px; text-align:left;}body{oncontextmenu: return false;onselectstart: return false;
}#play68box{width: 190px;font-size: 12px;line-height: 15px;right: -172px;top: 35%; position: fixed;z-index: 100;
}#tab{float: left;list-style: none outside none;padding: 0;position: relative;z-index: 99;margin-top: 10px;margin-right: 0;margin-bottom: 0;margin-left: 0;
}#tab li span{display: block;padding: 0 5px;position: relative;
}#links{width: 100px;padding: 1px;float: left;background-color: #f6bb42;border-radius: 8px;
}.show, .hide{transition: margin-right .4s ease-in;-webkit-transition: margin-right .4s ease-in;
}.hide{margin-right:0px;
}.show{margin-right:95px;
}#arrow, .bt{cursor: pointer;
}.bt{width: 95px;height: 41px;margin: 2px;text-align:center;font: bold 15px Arial, Helvetica, "Microsoft Yahei", "微软雅黑", STXihei, "华文细黑", sans-serif;background-color: #da4453;border-radius: 6px;
}.bt a{line-height: 40px;color: #fff;display: block;text-decoration:none;
}.bt:hover{transition: background .3s linear         -o-transition: background .3s linear;-moz-transition: background .3s linear;-webkit-transition: background .3s linear;background-color: #37bc9b;
}#deco{width: 90px;float: left;    
}#share-wx{background:rgba(0,0,0,0.8);position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:10000;display:none;
}#wx-qr{background:rgba(0,0,0,0.8);position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:10000;display:none;
}
</style>
<script>
document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {WeixinJSBridge.call('showOptionMenu');
});
new Image().src = 'http://game2.id87.com/';
</script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=34915524" charset="UTF-8"></script>
</head>
<body onLoad="main()" id="0">
<div style="text-align:center;">
<canvas id="jsGameScreen"></canvas> 
</div>
<script type="text/javascript">
var mebtnopenurl = 'http://game2.id87.com/';
function shareFriend() {WeixinJSBridge.invoke("sendAppMessage", {appid: appid,img_url: imgUrl,img_width: "200",img_height: "200",link: lineLink,desc: descContent,title: shareTitle},function(e) {document.location.href = mebtnopenurl;})
}
function shareTimeline() {WeixinJSBridge.invoke("shareTimeline", {img_url: imgUrl,img_width: "200",img_height: "200",link: lineLink,desc: descContent,title: shareTitle},function(e) {document.location.href = mebtnopenurl;})
}
function shareWeibo() {WeixinJSBridge.invoke("shareWeibo", {img_url: imgUrl,content: shareTitle + " " + descContent,url: lineLink},function(e) {document.location.href = mebtnopenurl;})
}
function isWeixin() {var e = navigator.userAgent.toLowerCase();if (e.match(/MicroMessenger/i) == "micromessenger") {return true} else {return false}
}
function toggle(e) {var t = document.getElementById(e);var n = document.getElementById("arrow");var r = t.getAttribute("class");if (r == "hide") {t.setAttribute("class", "show");delay(n, RESOURCE_IMG_PATH + "arrowright.png", 400)} else {t.setAttribute("class", "hide");delay(n, RESOURCE_IMG_PATH + "arrowleft.png", 400)}
}
function delay(e, t, n) {window.setTimeout(function() {e.setAttribute("src", t)},n)
}
function show_share() {document.getElementById("share-wx").style.display = "block"}
function closeshare() {document.getElementById("share-wx").style.display = "none"
}
function closewx() {document.getElementById("wx-qr").style.display = "none"
}
function addShareWX() {var e = document.createElement("div");e.id = "share-wx";e.onclick = closeshare;document.body.appendChild(e);var t = document.createElement("p");t.style.cssText = "text-align:right;padding-left:10px;";e.appendChild(t);var n = document.createElement("img");n.src = "2.png";n.id = "share-wx-img";n.style.cssText = "max-width:280px;padding-right:25px;";t.appendChild(n);
}if (getCookie("num")) {var nn = parseInt(getCookie("num"));setCookie("num", ++nn);} else {setCookie("num", 1);}function getCookie(name) { var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)"); if(arr=document.cookie.match(reg)) return unescape(arr[2]); else return null; } function setCookie(name, value) {var Days = 30;var exp = new Date();exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);document.cookie = name + "=" + escape(value) + ";expires" + exp.toGMTString();}function isMobile() {return navigator.userAgent.match(/android|iphone|ipod|blackberry|meego|symbianos|windowsphone|ucbrowser/i)
}
function isIOS() {return navigator.userAgent.match(/iphone|ipod|ios/i)
}
var HOME_PATH = HOME_PATH || "http://game2.id87.com/",
RESOURCE_IMG_PATH = RESOURCE_IMG_PATH || "/game/",
HORIZONTAL = HORIZONTAL || false,
COVER_SHOW_TIME = COVER_SHOW_TIME || 2e3;
var imgUrl = "1.jpg";
var lineLink = "http://game2.id87.com/mishi/";
var descContent = "快来跟我一起玩!";
var shareTitle = "最好玩的小游戏就在游戏排行榜!";
var appid = "";
document.addEventListener("WeixinJSBridgeReady",
function() {WeixinJSBridge.on("menu:share:appmessage",function(e) {shareFriend()});WeixinJSBridge.on("menu:share:timeline",function(e) {shareTimeline()});WeixinJSBridge.on("menu:share:weibo",function(e) {shareWeibo()});if (HORIZONTAL == true) {WeixinJSBridge.call("hideToolbar")}
},
false); (function() {function n() {window.scroll(0, 0);var e;if (window.orientation == 0 || window.orientation == 180) {e = false} else if (window.orientation == -90 || window.orientation == 90) {e = true}if (e == HORIZONTAL) {t.style.display = "none"} else {setTimeout(function() {r();t.style.width = window.innerWidth + "px";t.style.display = "block"},isIOS() ? 0 : 600)}if (HORIZONTAL == true && isWeixin() && !isIOS()) {WeixinJSBridge.call("hideToolbar")}}function r() {e.style.height = window.innerHeight + "px";e.style.width = window.innerWidth + "px";t.style.height = window.innerHeight + "px"}if (typeof play68_init == "function") {play68_init()}if (!isMobile()) return;var e = document.createElement("div");e.style.cssText = "position:absolute;z-index:1000000;left:0;top:0;background-size: 50%;width:" + window.innerWidth + "px;height:" + Math.max(window.innerHeight, window.document.documentElement.offsetHeight) + "px";e.className = "common_cover";document.body.appendChild(e);setTimeout(function() {e.parentNode.removeChild(e)},COVER_SHOW_TIME);document.addEventListener("touchmove",function(e) {e.preventDefault()},false);var t = document.createElement("div");t.className = "common_notice";t.style.cssText = "position:absolute;z-index:999999;left:0;top:0;background-size: 50%;";document.body.appendChild(t);window.addEventListener("orientationchange", n);window.addEventListener("load", n);window.addEventListener("scroll", r)
})();
addShareWX();
</script>
</body>
</html>

项目地址:https://download.csdn.net/download/Highning0007/88483229

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/123683.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Ubuntu 18.04 安装 Python3.8(安装包安装)

一、为什么用安装包&#xff0c;不用apt指令&#xff1f; 在使用apt指令安装时&#xff0c;莫名出现安装后的python3.8中没有pip&#xff0c;并且没有Math库&#xff01;&#xff01;&#xff01; ​​​​ 二、具体步骤 2.0准备环境 # 更新apt apt update # 安装相关包 apt…

1.spark standalone环境安装

概述 环境是spark 3.2.4 hadoop版本 3.2.4&#xff0c;所以官网下载的包为 spark-3.2.4-bin-hadoop3.2.tgz 在具体安装部署之前&#xff0c;需要先下载Spark的安装包&#xff0c;进到 spark的官网&#xff0c;点击download按钮 使用Spark的时候一般都是需要和Hadoop交互的&a…

2.7、图调度功能

introduction PPQ 的图调度功能 展示如何自由调度算子&#xff0c;并实现混合精度推理 code import torch import torchvision from ppq import * from ppq.api import *# ------------------------------------------------------------ # 在这个脚本中&#xff0c;我们将向…

10_4阻塞和非阻塞跟poll和等待队列

阻塞和非阻塞 广泛上的区别就是 应用程序如果非阻塞那读取不到数据就应该马上有返回值 阻塞的话就是在应用程序去read数据,但是设备驱动没有数据,就一直卡住,直到有数据再继续往下 补充阻塞知识,应用层大部分都是阻塞 如果要非阻塞 ,应用程序在打开设备节点的时候填写int fd …

辅助驾驶功能开发-功能规范篇(22)-4-L2级辅助驾驶方案功能规范

1.3.4 LDW系统功能定义 1.3.4.1 状态机 1.3.4.2 功能定义 1.3.4.2.1 信号需求列表 1.3.4.2.2 系统开启关闭 1)初始化 车辆上电后,车道偏离预警系统(LDW)进行初始化,控制器需要在上电后 220ms 内发出第一帧报文,并在 3s 内 完成内部自检,同时上电 3s 内不进行关联系统…

面经——java后端第一天

1.java和c区别是&#xff1f; 性能⾼&#xff1a;C 是⼀种编译型语⾔&#xff0c;可以⽣成⾼效的机器代码&#xff0c;所以在处理⼤量数据和对计算效率有要求的应⽤场景下具有优势&#xff1b; C 和 Java 是两种编程语言&#xff0c;它们之间有很多区别&#xff0c;主要包括以…

计算机网络常识

文章目录 1、HTTP2、HTTP状态码1xx&#xff08;信息性状态码&#xff09;&#xff1a;2xx&#xff08;成功状态码&#xff09;&#xff1a;3xx&#xff08;重定向状态码&#xff09;&#xff1a;4xx&#xff08;客户端错误状态码&#xff09;&#xff1a;5xx&#xff08;服务器…

ActiveMQ

ActiveMQ 安装 下载网址&#xff1a;ActiveMQ 一定要和自己安装的jdk版本匹配&#xff0c;不然会报错 下载到本地之后解压缩 有可能端口号被占用 解除端口号占用&#xff0c;参考&#xff1a;Windows_端口被占用 打开cmd 查询所有的端口号 netstat -nao查询指定端口号 n…

数组元素逆序交换

数组元素逆序交换 例如&#xff1a; 输入&#xff1a; 1,2,3,4,5 输出&#xff1a; 5,4,3,2,1 代码&#xff1a; #include<stdio.h> #define N 5 int main() {int a[N], i, temp;for (i 0; i < N; i) {scanf("%d", &a[i]);}for (i 0; i < N…

C语言选择排序

1.选择排序(Selection sort) 选择排序是简单直观的排序算法。 基本思想&#xff1a;从首元素开始&#xff0c;首元素与它后面的所有元素进行比较&#xff0c;找到数列中最小的元素&#xff0c;与首元素值交换。然后下一个元素与它后面的元素比较&#xff0c;得到第二小的元素…

对Linux线程的理解(什么是线程,线程的创建终止等待分离,线程互斥,Linux常见的锁,线程同步),两万字总结,有这一篇文章就够了!

文章目录 一、什么是线程1.线程是怎样描述的2.线程与进程的区别3.线程的优缺点4.理解Linux的轻量级进程 二、Linux线程控制1.线程创建:pthread_create()2.线程终止:pthread_exit()3.线程等待:pthread_join()4.分离线程:pthread_detach() 三、Linux线程互斥1.互斥量2.线程安全与…

移动端自动化-Appium元素定位

文章目录 Appium元素定位第一类&#xff1a;属性定位第二类&#xff1a;路径定位 常见问题理解appium server 和 appium inspector 以及 appium-python-client的关系 appium是跨平台的&#xff0c;支持OSX&#xff0c;Windows以及Linux系统。它允许测试人员在不同的平台&#x…

我在Vscode学OpenCV 初步接触

OpenCV是一个开源的计算机视觉库&#xff0c;可以处理图像和视频数据。它包含了超过2500个优化过的算法&#xff0c;用于对图像和视频进行处理&#xff0c;包括目标识别、面部识别、运动跟踪、立体视觉等。OpenCV支持多种编程语言&#xff0c;包括C、Python、Java等&#xff0c…

在HTML当中引入Vue控件,以element-ui为例

前情&#xff1a;需要实现一个同时满足按天、按周、按月选择的时间选择器&#xff0c;但是以HTML为基础写的都不太满足我的要求&#xff0c;要么只能按天选择&#xff0c;要么就是想选择久远的时间得点很久&#xff0c;除非自己写捷径&#xff0c;所以就看上了element-ui的这个…

动静分离技术

一、HAproxy 动静分离 1、概念&#xff1a; HAproxy 动静分离技术是一种用于优化 Web 服务器性能和提高用户体验的策略&#xff0c;它通过将动态内容和静态内容分别路由到不同的后端服务器来实现&#xff0c;减轻服务器负载&#xff0c;提高网站的响应速度。 动态内容包括由…

MySQL篇---第二篇

系列文章目录 文章目录 系列文章目录一、数据库的事务二、索引是什么三、SQL优化手段有哪些一、数据库的事务 什么是事务?: 多条sql语句,要么全部成功,要么全部失败。 事务的特性: 数据库事务特性:原子性(Atomic)、一致性(Consistency)、隔离性(Isolation)、持久性 (Du…

SylixOS BSP开发(七)

实现系统调试信息打印接口 当系统出错时或者使用内核日志时会输出一些打印信息&#xff0c;这最终都是调用到bspLib.c中的bspDebugMsg 这个接口来实现的&#xff0c;所以我们在开发BSP时&#xff0c;第一个要做的工作就是实现这个接口。 一般的调试信息都是通过串口来输出的&am…

linux-tools-$(uname -r) linux-headers-$(uname -r)工具安装:

linux-tools-$(uname -r) linux-headers-$(uname -r)工具安装: ebpfebpf-virtual-machine:~$ sudo apt-get install linux-tools-$(uname -r) [sudo] ebpf 的密码&#xff1a; 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 linux…

经典目标检测神经网络 - RCNN、SSD、YOLO

文章目录 1. 目标检测算法分类2. 区域卷积神经网络2.1 R-CNN2.2 Fast R-CNN2.3 Faster R-CNN2.4 Mask R-CNN2.5 速度和精度比较 3. 单发多框检测&#xff08;SSD&#xff09;4. YOLO 1. 目标检测算法分类 目标检测算法主要分两类&#xff1a;One-Stage与Two-Stage。One-Stage与…

虚拟机Ubuntu下运行vue-element-admin项目

一.环境搭建 1.安装nodejs sudo apt install nodejs 安装完成后&#xff0c;查看对应的版本号 nodejs -v没有问题&#xff0c;会输出对应版本号&#xff0c;我这里是10.19.0 v10.19.0 2.安装npm sudo apt install npm安装完成查看对应的版本号&#xff0c;确认OK npm -…