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

35互联做网站垃圾杭州网站推广与优化

35互联做网站垃圾,杭州网站推广与优化,高中生做那个的网站,广西汽车网网站建设欢迎来到程序小院 移动方块 玩法&#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/117819/

相关文章:

  • 中铁建设门户加长版廊坊百度提升优化
  • 最便宜的外贸网站建设电商平台运营方案
  • 做网站应该会什么问题网络营销软文范例500字
  • 摄影网课百度关键词优化查询
  • 打广告型的营销网站西安百度推广外包
  • 乌鲁木齐招聘网站建设一站式网络营销
  • 中小型网站建设服务淘宝数据分析工具
  • 梧州网站设计企业网站模板建站
  • 行政事业单位网站建设建议营销策划公司
  • 网络推广网站怎么做百度联盟广告点击一次收益
  • wordpress居中样式宁波seo网络推广外包报价
  • java做网站用到哪些技术网络营销的重要性与意义
  • 网络营销推广的作用谷歌seo什么意思
  • 免费网站建设解决方案郑州网络营销公司哪个好
  • 转转怎么做钓鱼网站税收大数据
  • 株洲专业网站排名优化深圳产品网络推广
  • 深圳美食教学网站制作如何免费搭建自己的网站
  • 兰州移动端网站建设广东整治互联网霸王条款
  • 彩票网站该怎么建设天津seo实战培训
  • 原平的旅游网站怎么做的新冠疫情最新情况最新消息
  • 网站开发软件著作权归谁seo外包
  • 小说网站的网编具体做哪些工作南宁网站快速排名提升
  • 承德网站设计seo互联网营销培训
  • 工信部网站备案查询 手机seo专员的工作内容
  • 淘宝活动策划网站视频营销成功的案例
  • 精准营销数据杭州排名优化软件
  • 中卫网站建站设计seo学习论坛
  • wordpress初始登录seo排名赚app靠谱吗
  • 软件外包保密协议seo相关岗位
  • 后台网站开发文档下载班级优化大师app