基本信息
源码名称:html5捕鱼游戏
源码大小:4.40M
文件格式:.zip
开发语言:PHP
更新时间:2020-07-15
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
基于html5 js的捕鱼小游戏
//获取URL参数设置
var params = this.params = Q.getUrlParams();
if(params.mode == undefined) params.mode = 2;
if(params.fps) this.fps = params.fps;
this.fireInterval = this.fps*0.5;
if(Q.isIpod || Q.isIphone)
{
this.width = 980;
this.height = 545;
Q.addMeta({name:"viewport", content:"user-scalable=no"});
}else
{
Q.addMeta({name:"viewport", content:"user-scalable=no, initial-scale=1.0, minimum-scale=1, maximum-scale=1"});
this.width = Math.min(1024, window.innerWidth);
this.height = Math.min(768, window.innerHeight);
}
if(params.width) this.width = Number(params.width) || this.width;
if(params.height) this.height = Number(params.height) || this.height;
//初始化容器设置
this.container = container || Q.getDOM("container");
this.container.style.overflow = "hidden";
this.container.style.width = this.width "px";
this.container.style.height = this.height "px";
this.screenWidth = window.innerWidth;
this.screenHeight = window.innerHeight;
//load info
var div = Q.createDOM("div", {innerHTML: "正在加载资源中,请稍候...<br>", style:
{
id: "loader",
position: "absolute",
width: this.width "px",
left: "0px",
top: (this.height >> 1) "px",
textAlign: "center",
color: "#fff",
font: Q.isMobile ? 'bold 16px 黑体' : 'bold 16px 宋体',
textShadow: "0 2px 2px #111"
}});
this.container.appendChild(div);
this.loader = div;
//hide nav bar
this.hideNavBar();
if(Q.supportOrientation)
{
window.onorientationchange = function(e)
{
game.hideNavBar();
if(game.stage) game.stage.updatePosition();
};
}
//start load image
var imgLoader = new Q.ImageLoader();
imgLoader.addEventListener("loaded", Q.delegate(this.onLoadLoaded, this));
imgLoader.addEventListener("complete", Q.delegate(this.onLoadComplete, this));
imgLoader.load(ns.R.sources);
}
基于html5 js的捕鱼小游戏
game.load = function(container)
{//获取URL参数设置
var params = this.params = Q.getUrlParams();
if(params.mode == undefined) params.mode = 2;
if(params.fps) this.fps = params.fps;
this.fireInterval = this.fps*0.5;
if(Q.isIpod || Q.isIphone)
{
this.width = 980;
this.height = 545;
Q.addMeta({name:"viewport", content:"user-scalable=no"});
}else
{
Q.addMeta({name:"viewport", content:"user-scalable=no, initial-scale=1.0, minimum-scale=1, maximum-scale=1"});
this.width = Math.min(1024, window.innerWidth);
this.height = Math.min(768, window.innerHeight);
}
if(params.width) this.width = Number(params.width) || this.width;
if(params.height) this.height = Number(params.height) || this.height;
//初始化容器设置
this.container = container || Q.getDOM("container");
this.container.style.overflow = "hidden";
this.container.style.width = this.width "px";
this.container.style.height = this.height "px";
this.screenWidth = window.innerWidth;
this.screenHeight = window.innerHeight;
//load info
var div = Q.createDOM("div", {innerHTML: "正在加载资源中,请稍候...<br>", style:
{
id: "loader",
position: "absolute",
width: this.width "px",
left: "0px",
top: (this.height >> 1) "px",
textAlign: "center",
color: "#fff",
font: Q.isMobile ? 'bold 16px 黑体' : 'bold 16px 宋体',
textShadow: "0 2px 2px #111"
}});
this.container.appendChild(div);
this.loader = div;
//hide nav bar
this.hideNavBar();
if(Q.supportOrientation)
{
window.onorientationchange = function(e)
{
game.hideNavBar();
if(game.stage) game.stage.updatePosition();
};
}
//start load image
var imgLoader = new Q.ImageLoader();
imgLoader.addEventListener("loaded", Q.delegate(this.onLoadLoaded, this));
imgLoader.addEventListener("complete", Q.delegate(this.onLoadComplete, this));
imgLoader.load(ns.R.sources);
}