您现在的位置是:经典90版h一分赛车投注网站tml坦克大战小游戏代码【北京PK10投注】少花钱中大奖_PK10开奖直播_PK拾技巧 >>正文
经典90版h一分赛车投注网站tml坦克大战小游戏代码【北京PK10投注】少花钱中大奖_PK10开奖直播_PK拾技巧
蜂媒蝶使网9人已围观
简介n下一关,p上一关。</h3></head><div class="main clearfix"><div id="canvasDiv" ><ca...
部分js代码
var Stage = function(context,l){ this.ctx = context; this.ctx.fillStyle = "#7f7f7f"; this.drawHeigth = 15; this.level = l; this.temp = 0; this.dir = 1; //中间切换的方向,2:展开 this.isReady = false;//标识地图是否已经画好 this.levelNum = new Num(context); this.init = function(level){ this.dir = 1; this.isReady = false; this.level = level; this.temp = 0; }; this.draw = function(){ if(this.dir == 1){ //temp = 15*15 灰色屏幕已经画完 if(this.temp == 225){ //78,14为STAGE字样在图片资源中的宽和高,坦克页面小游戏,$$$$$演示地址http://www.bokequ.com/show/youxi/1/
电脑键盘操作说明:
玩家1:wasd上左下右,主要用来停顿 this.temp = 225; this.dir = -1; START_AUDIO.play(); }else{ this.ctx.fillRect(0, this.temp, 512, this.drawHeigth); this.ctx.fillRect(0, 448 - this.temp - this.drawHeigth , 512, this.drawHeigth); } }else{ if(this.temp >= 0){ this.ctx.clearRect(0, this.temp , 512, this.drawHeigth); this.ctx.clearRect(0, 448 - this.temp - this.drawHeigth, 512, this.drawHeigth); }else{ this.isReady = true; } } this.temp += this.drawHeigth * this.dir; };};
玩家2:方向键,1:合上,enter射击。
html页面代码
<!DOCTYPE html><html lang="zh" class="no-js demo-1"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="js/jquery.min.js"></script> <script src="js/Helper.js"></script> <script src="js/keyboard.js"></script> <script src="js/const.js"></script> <script src="js/level.js"></script> <script src="js/crackAnimation.js"></script> <script src="js/prop.js"></script> <script src="js/bullet.js"></script> <script src="js/tank.js"></script> <script src="js/num.js"></script> <script src="js/menu.js"></script> <script src="js/map.js"></script> <script src="js/Collision.js"></script> <script src="js/stage.js"></script> <script src="js/main.js"></script> <link rel="stylesheet" type="text/css" href="css/default.css" /> <style type="text/css"> #canvasDiv canvas{ position:absolute; } </style> </head> <body> <div class="container"> <head> <h3>操作说明:玩家1:wasd上左下右,
Tags:
相关文章
高温+越障,追觅S50Pro水箱版仅需2673元,智能洗地新标杆
经典90版h一分赛车投注网站tml坦克大战小游戏代码【北京PK10投注】少花钱中大奖_PK10开奖直播_PK拾技巧标题:追觅S50Pro扫拖机器人:高温与越障的完美结合,智能洗地的全新标杆随着科技的进步,智能家居产品已经逐渐走入了我们的生活。在这其中,扫地机器人作为一种能够自动清扫地面的智能设备,受到了广大用户的...
阅读更多
虚拟主机导入MySQL出现Unknown character set:utf8mb4
经典90版h一分赛车投注网站tml坦克大战小游戏代码【北京PK10投注】少花钱中大奖_PK10开奖直播_PK拾技巧前几天进行网站搬家,MySQL导入数据的时候,出现以下错误(没有定义的编码集utf8mb4):SQL 查询:/*!40101 SET NAMES utf8mb4 */;MySQL 返回:文档#1115...
阅读更多
DedeCMS个人网站常见漏洞有哪些
经典90版h一分赛车投注网站tml坦克大战小游戏代码【北京PK10投注】少花钱中大奖_PK10开奖直播_PK拾技巧DedeCMS是一款开源的PHP网站内容管理系统,由于简单、灵活,很多站点都是基于织梦CMS搭建、二次开发,特别是DEDECMS仿站是一些站长比较喜欢的。用dedecms建站都知道它的版本经常更新升级...
阅读更多