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

网站建设与规划结论推广方式怎么写

网站建设与规划结论,推广方式怎么写,订阅号可以建设微网站,灵感设计网站欢迎来到程序小院 移动方块 玩法&#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/752444/

相关文章:

  • 高校思政主题网站建设的意义关键词歌词任然
  • 哪里做网站比较快2345网址导航下载桌面
  • 广州建设委员会官方网站凡科建站下载
  • 全球做网站的公司排名百度一下你就知道官网
  • 小企业网站价格免费发链接的网站
  • 买了空间和域名 怎么做网站哪家公司网站做得好
  • 网站备案是否关闭衡阳网站建设公司
  • 遂昌建设局网站个人怎么做网站
  • 软件开发和网站建设网络营销的未来6个发展趋势
  • 做网站一年多少钱免费seo网站推广
  • 智通人才网东莞最新招聘信息官网seo是如何做优化的
  • 个人做跨境电商网站百度地图导航手机版免费下载
  • 阿里云注册网站之后怎么做网站百度联盟是什么
  • 动画制作视频河南网站排名优化
  • 网站关键词怎么做排名掌门一对一辅导官网
  • 现在什么网站做推广比较好网页设计需要学什么
  • 个人购物网站 怎么建网络营销包括
  • 有没有做鸭的网站工作室招聘广州网站优化工具
  • 深圳营销外深圳网络营销公司seo和sem的联系
  • 专业的网站制作公司哪家好竞价专员是做什么的
  • 海南省建设厅网站百度seo霸屏软件
  • 淄博张店做网站的公司爱站小工具圣经
  • wordpress w3seo优化自学
  • 临沂手机建站模板微信seo排名优化软件
  • 网站管理员怎么做板块建设艺人百度指数排行榜
  • 如何创建企业网站网络舆情处置的五个步骤
  • 做站长工具网站周口seo公司
  • 泉州自助建站系统地推
  • 美国 做网站免费网站建设哪家好
  • 如何做响应式布局网站seo搜索引擎优化期末及答案