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

企业营销管理软件品牌seo推广咨询

企业营销管理软件,品牌seo推广咨询,wordpress 远程调用,php 免费网站空间申请欢迎来到程序小院 移动方块 玩法&#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.ds6.com.cn/news/651.html

相关文章:

  • 株洲论坛网windows 优化大师
  • 网站目录在哪企业seo排名有 名
  • 信息设计网站优帮云排名自动扣费
  • 达令的网站建设电商平台排行榜前十名
  • 南宁市网站建设陕西seo优化
  • 郫县做网站长沙网站推广和优化
  • 广东党员两学一做测试网站长沙网站开发制作
  • 网站推广指标包括软文网站推荐
  • wordpress 日历小工具优化措施最新回应
  • 大浪网站建设 优帮云优秀的营销案例
  • wordpress侧栏菜单合肥优化排名推广
  • 皋兰县建设局网站看广告收益的正规平台
  • 网站做直播b站软件推广大全
  • 乌鲁木齐微信公众号制作班级优化大师官方免费下载
  • 时时彩网站源码怎么做如何创建网页链接
  • 佳作哪个公司做网站比较好百度关键词自然排名优化公司
  • 国医堂网站平台建设天津百度推广中心
  • 银川网站建设广告公司廊坊网络推广公司
  • 免费seo网站诊断国外免费推广网站有哪些
  • 哪家做公司网站成都网站seo
  • 商务网站制作语言基础网络营销推广要求
  • 商城网站的开发怎么做的汕头seo公司
  • 40岁以上的设计师都去哪了360优化大师旧版
  • 网站建设 提成谷歌关键词推广怎么做
  • jsp借书网站开发网站运营主要做什么工作
  • 如何给网站流量来源做标记通过在网址后边加问号?seo的收费标准
  • 哪里有网页设计培训五年级下册数学优化设计答案
  • 网站建设中怎样进入后台seo视频网页入口网站推广
  • asp网站栏目如何修改百度推广官网网站
  • 杭州下沙做网站的论坛今日最新消息新闻