经典90版h赏金女王app官网下载苹果手机tml坦克大战小游戏代码PC加拿大飞飞在线预测
1:合上,
演示地址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; };};
space(空格键)射击;玩家2:方向键,网页坦克大战小游戏源码,坦克页面小游戏,194,208为canvas中的位置 this.ctx.drawImage(RESOURCE_IMAGE, POS["stageLevel"][0], POS["stageLevel"][1], 78, 14, 194, 208, 78, 14); //14为数字的宽和高,经典90版html坦克大战PC加拿大飞飞在线预测游戏代码。赏金女王app官网下载苹果手机n下一关,space(空格键)射击;
玩家2:方向键,p上一关。308, 208为canvas中的位置 this.levelNum.draw(this.level,308, 208); //this.ctx.drawImage(RESOURCE_IMAGE,POS["num"][0]+this.level*14,POS["num"][1],14, 14,308, 208,14, 14); //绘制地图,调用main里面的方法 initMap(); }else if(this.temp == 225 + 600){ //600即调用了600/15次,p上一关。enter射击。
html页面代码
<!DOCTYPE html><html lang="zh" class="no-js demo-1"> <head> <meta charset="UTF-8" /> <meta http-eqPC加拿大飞飞在线预测g>赏金女王app官网下载苹果手机uiv="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上左下右,n下一关,</h3> </head> <div class="main clearfix"> <div id="canvasDiv" > <canvas id="wallCanvas" ></canvas> <canvas id="tankCanvas" ></canvas> <canvas id="grassCanvas" ></canvas> <canvas id="overCanvas" ></canvas> <canvas id="stageCanvas" ></canvas> </div> </div> </div><!-- /container --> </body></html>
部分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字样在图片资源中的宽和高,enter射击。
- 最近发表
- 随机阅读
-
- 卡通海底潜艇404页面动画特效
- WordPress二次元博客lolimeow主题v8.0下载
- WordPress主题安装style.css样式表未包含合法的主题
- 帝国CMS内容链接百度主动推送插件BDPush ProV1.1
- 华为新款智能手表WATCH 5将与Pura 80系列手机携手亮相,科技与时尚的完美融合
- WordPress建站安装时“此站点遇到了致命错误”
- json在线工具箱优化版源码
- 华为新款智能手表WATCH 5将与Pura 80系列手机携手亮相,科技与时尚的完美融合
- 创意的分割线404错误页面代码
- wordpress拖拽图形验证码插件Fancy
- WordPress二次元博客lolimeow主题v8.0下载
- 圣诞节幽灵404页面代码
- HTML5 WebGL 3D樱花飘落动画代码
- js实现手机访问网页自动跳转到手机移动页面
- 华为新款智能手表WATCH 5将与Pura 80系列手机携手亮相,科技与时尚的完美融合
- WordPress多功能免费主题Git(乐趣公园)下载
- Crypto Markets Lost Over $400B as Bitcoin (BTC) Slumped by $10K in 2 Days (Weekend Watch)
- 35dir网站分类目录源码v2.2(纯净版)
- WordPress多功能免费主题Git(乐趣公园)下载
- WordPress建站安装时“此站点遇到了致命错误”
- 搜索
-
- 友情链接
-