当前位置: 首页 > news >正文

哪些网站动效做的不错2021年关键词排名

哪些网站动效做的不错,2021年关键词排名,手机门户网站源码,谷歌优化师欢迎来到程序小院 移动方块 玩法&#xff1a;移动中心方块&#xff0c;不要被四周移动的方块碰到&#xff0c;移动到空白处&#xff0c;看看你能够坚持多久&#xff0c;快去移动方块吧^^。开始游戏https://www.ormcc.com/play/gameStart/212 html <div id"container&q…

欢迎来到程序小院

移动方块

玩法:移动中心方块,不要被四周移动的方块碰到,移动到空白处,看看你能够坚持多久,快去移动方块吧^^。

开始游戏icon-default.png?t=N7T8https://www.ormcc.com/play/gameStart/212

html

  <div id="container"></div>

css

html,body{height: 400px;margin: 0;padding: 0;background-color: #fff;
}
#container canvas{margin: 4% auto;margin-top:0;
}

js

var mainState=function(game){
var enemy=[];
var enemys;
var player;
var around;
this.create=function(){game.physics.startSystem(Phaser.ARCADE);game.add.image(0,0,'background');enemys=game.add.group();enemys.enableBody=true;enemys.create(75,35,'enemy');enemys.create(0,50,'enemy');enemys.getChildAt(1).scale.setTo(2,1);enemys.getChildAt(1).x=game.world.width-enemys.getChildAt(1).width-50;enemys.create(80,330,'enemy');enemys.getChildAt(2).scale.setTo(1,2);enemys.create(400,300,'enemy');enemys.getChildAt(3).scale.setTo(1.5);around=game.add.group();around.enableBody=true;around.create(0,0,'around_h');around.create(game.world.width-30,0,'around_h');around.create(0,0,'around_v');around.create(0,game.world.height-30,'around_v');player=game.add.sprite(0,0,'player');game.physics.arcade.enable(player);player.x=(game.world.width-player.width)/2;player.y=(game.world.height-player.height)/2;player.scale.setTo(0.7);player.inputEnabled=true;player.input.enableDrag(false);loopMove(enemys.getChildAt(0),3,3); loopMove(enemys.getChildAt(1),3,3); loopMove(enemys.getChildAt(2),3,3); loopMove(enemys.getChildAt(3),3,3); timeStr = game.add.text(0,game.world.height/9);
}
this.update=function(){ game.physics.arcade.overlap(player,around,function(){game.state.start('theEnd');});  game.physics.arcade.overlap(player,enemys,function(){game.state.start('theEnd');});
}
this.render=function(){timeStr.text = game.time.totalElapsedSeconds().toFixed(3)+"s";timeStr.x=(game.world.width-timeStr.width)/2;
}
}
//THEENDSTATE///
var theEndState = function(game){this.create=function(){var text = game.add.text(0,game.world.height/4);text.text='你坚持了'+timeStr.text;text.x=(game.world.width-text.width)/2;var button=game.add.button(0,-200,'button',function(){location.reload();});button.x=(game.world.width-button.width)/2;game.add.tween(button).to( { y: game.world.centerY }, 2000, Phaser.Easing.Bounce.Out, true);};
}
///PUBLIC/
var game=new Phaser.Game(579,528,Phaser.AUTO,'container');
game.state.add('boot',bootState);
game.state.add('loader',loaderState);
game.state.add('main',mainState);
game.state.add('theEnd',theEndState);
game.state.start('boot');  
///FUNCTIONfunction loopMove(obj,x,y){ game.time.events.loop(Phaser.Timer.SECOND/70, function(){if (obj.x <= 30  ) {x = -x}if (obj.y <= 30  ) {y = -y}if (obj.x > game.world.width -30-obj.width) {x = -x}if (obj.y > game.world.height - 30-obj.height) {y = -y}obj.x = obj.x + x;obj.y = obj.y + y;}, this);}
}

源码

需要源码请关注添加好友哦^ ^

转载:欢迎来到本站,转载请注明文章出处https://ormcc.com/

http://www.hkea.cn/news/676863/

相关文章:

  • 网站开发要注意安全性公司优化是什么意思
  • 河北邢台做移动网站开通网站需要多少钱
  • 天河网站建设多少钱淘宝关键词优化
  • 中型网站 收益关键词排名查询官网
  • 网站的弹窗是怎么做的谈谈对seo的理解
  • 广州网站制作费用宁波seo外包哪个品牌好
  • 河南高端网站建设广州网站优化页面
  • 企业可以备案几个网站南昌seo实用技巧
  • 网站用什么布局专业网站建设公司
  • 公司网站怎么做分录it培训机构学费一般多少
  • 如何将自己做的网页做成网站绍兴seo
  • 河南省住房与城乡建设厅网站首页怎么做属于自己的网站
  • 移动端网站开发推广效果最好的平台
  • 用二级页面做网站的源代码自助建站系统破解版
  • 网站上怎么做动画广告推广策略包括哪些内容
  • 广州网站优化公司大亚湾发布
  • 广州网站开发招聘百度经验悬赏令
  • 吴江建设局网站郑州粒米seo外包
  • 建设工程合同纠纷与劳务合同纠纷seo培训教程视频
  • 找网站建设公司哪家最好沈阳市网站
  • sh域名做的好的网站什么是营销
  • 网站平台怎么做推广一站式网络推广服务
  • 百度对新网站排名问题兰州seo快速优化报价
  • 网站建设常用代码湘潭网络推广
  • 做网站上传图片一直错误好用搜索引擎排名
  • 钟祥网站建设网络推广的含义
  • 新闻类网站源码青岛官网seo
  • 网站优化哪里可以做百度营销客户端
  • 常德建设局网站北京优化网站方法
  • 用ip做网站优化手机流畅度的软件