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

西安微网站制作网站备案是什么意思

西安微网站制作,网站备案是什么意思,wordpress维护插件,做门户网站用什么欢迎来到程序小院 掉瓶子 玩法:旋转的瓶子,根据瓶子方向,点击鼠标左键瓶子掉落,从桌面中间掉下即得1分,卡在桌边瓶子碎了游戏结束,快去掉瓶子吧^^。开始游戏https://www.ormcc.com/play/gameStart/203 htm…

欢迎来到程序小院

掉瓶子

玩法:旋转的瓶子,根据瓶子方向,点击鼠标左键瓶子掉落,从桌面中间掉下即得1分,卡在桌边瓶子碎了游戏结束,快去掉瓶子吧^^。

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

html

  <div id="phaser-example" style="text-align: center;"></div>

css

body{margin: 0%;padding: 0%;
}

js

gameover = false;
//console.log(this.sound);
var bg = this.add.image(0, 0, 'bg').setOrigin(0);
bg.width = game.config.width;
bg.height = game.config.height;//bottle = this.add.sprite(0, 0, 'bottle').setOrigin(0.5).setScale(0.2).setInteractive();
bottle = this.physics.add.sprite(0, 0, 'bottle').setOrigin(0.5).setScale(0.2);
bottle.body.offset.set(bottle.width*2,0);//设置身体偏移量 锚点缩小2倍 偏移需放大2倍
bottle.isRotation = true;
//对象在游戏内居中
// bottle.x = (game.config.width - bottle.width*bottle.scaleX)/2;
// bottle.y = (game.config.height - bottle.height*bottle.scaleY)/2;
bottle.x = (game.config.width - bottle.width*bottle.scaleX)/1.85;
bottle.y = (game.config.height - bottle.height*bottle.scaleY)/4;
bottle.on('pointerdown', function (pointer) {                     //对象的事件监听器//this.setTint(0xff0000);                                         //设置当前元素的填充色});
this.input.on('pointerdown', function (pointer) {bottle.isRotation = false;bottle.body.gravity.y = 500;//game.sound.play('swing');});tables = this.physics.add.staticGroup();
tablel = tables.create(320 - 560/1.67, 480 - 700/4, 'tablel').setScale(0.5);
//tablel.body.y = 340;
tabler = tables.create(560/1.49, 480 - 700/4, 'tabler').setScale(0.5);scoreText = this.add.text(0,0,score);
scoreText.setColor('#0');
scoreText.setFontSize(36);
Phaser.Display.Align.In.TopRight(scoreText, bg);
if(gameover){return;
}
if(bottle.isRotation == true){bottle.angle += angle;
}if (checkOverlap(bottle, tablel)) {collider = true;
} else {collider = false;
}
if (checkOverlap(bottle, tabler)) {collider = true;
} else {collider = false;
}if(collider & bottle.y > 340)
{bottle.destroy();//this.sound.play('sklo2');//此处播放粒子动画particles = this.add.particles('Debris');particles.createEmitter({setFrame: 'sprite-sheet0.png',//frame: [ 'sprite-sheet0.png', 'sprite2-sheet0.png', 'sprite3-sheet0.png' ],x: game.config.width/2,//横坐标y: 340,//纵坐标speed: 50,//速度gravityY: 200,//重力frequency: 1000,//频率lifespan: 2000,//周期alpha: { start: 1, end: 0 },scale: { min: 0.05, max: 0.4 },rotate: { start: 0, end: 360, ease: 'Back.easeOut' },angle: { min: 0, max: 360 },speed: { min: 10, max: 100 },quantity: 12,//一次性的数量on:!false//开关});this.time.addEvent({ delay: 1000, callback: destroyParticles, callbackScope: this });//gameovergameover = true;
}
if(bottle.y > game.config.height){//此处关卡通行进入下一级//this.sound.play('gift');score++;if(Math.floor(Math.random()*(9+1)) >= 5){angle = score;} else {angle = -score;}gameover = false;stateStart('demo',this);
}
// if (isNull(score)){
//     scoreText.setText('score');
// }
scoreText.setText(score);
console.log(score);
var bg = this.add.image(0, 0, 'bg').setOrigin(0);
bg.width = game.config.width;
bg.height = game.config.height;
var bar = this.add.image(0,0,'bar').setOrigin(0).setScale(1,0.6);
bar.setX(0);
bar.setY(bar.height*bar.scaleY*1.25);
bar.width = game.config.width;
bar.height *= bar.scaleY;
scoreText = this.add.text(0,0,'Score:' + score);
var bestText = this.add.text(0,0,'Best:' + bestScore);
Phaser.Display.Align.In.Center(scoreText, bar);
scoreText.y -= scoreText.height;
Phaser.Display.Align.In.Center(bestText, bar);
bestText.y += bestText.height;
var overText = this.add.text(0,0,'Game Over');
overText.setColor('#0');
overText.setFontSize(36);
Phaser.Display.Align.In.TopCenter(overText, bg);
overText.y = bar.y - overText.height * 1.25;var btnRePlay = this.add.image(0,0,'btn').setScale(0.5).setInteractive();
Phaser.Display.Align.In.BottomCenter(btnRePlay, bg);
btnRePlay.y -= btnRePlay.height*btnRePlay.scaleY;
var that = this;
btnRePlay.on('pointerdown', function (pointer) {//game.sound.play('click');score = 0;angle = 1;//alert(this.scene.scene.key);//that.scene.setVisible(false);stateStart('demo',that);btnRePlay.destroy();
});

源码

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

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

http://www.hengruixuexiao.com/news/18196.html

相关文章:

  • 商城站企业网站seo平台
  • 网站建设与管理课后作业答案seo培训费用
  • 苏州网站建设方法网站推广技巧
  • 宁德做网站站长工具seo综合查询推广
  • 宣城市住房和城乡建设委员会网站优化防疫措施+科学精准防控
  • 虎门做网站国际国内新闻最新消息今天
  • 网站开发工程师职业定位网络推广方式有哪些
  • 哪里有做网站排名优化台州网站建设
  • 学生成绩管理系统 网站建设公司专业网站建设
  • 深圳有做网站的吗找客户的软件有哪些
  • 推广优化公司网站百度一下官方网页
  • 收录文案网站视频号的链接在哪
  • 网站建设与管理维护 大学论文做一个推广网站大概多少钱
  • 重庆市建设工程造价信息表重庆seo整站优化外包服务
  • 体育馆做网站公司web网页制作成品免费
  • 苏州前程无忧官上做网站国际足联世界排名
  • 水磨沟区做网站如何写营销软文
  • 知识付费网站制作seo是什么工作内容
  • 城乡建设行业证书查询网站推广优化网址
  • 做的网站打印全乱掉了网络销售推广平台
  • 外贸建站服务器怎么选百度电脑版网页版入口
  • 建设银行什么网站可买手表网站推广服务外包
  • 偃师网站开发公关公司一般收费标准
  • H5平台网站建设seo精灵
  • wordpress如何优化网站点击排名优化
  • 小程序制作卡片列表重庆seo关键词优化服务
  • 昆明本地网站厉害的seo顾问
  • 互联网营销和传统营销的区别学seo如何入门
  • 郑州网站建设方案报价网站在线客服系统源码
  • 成都信用建设网站百度竞价推广怎么做效果好