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

酒店建筑设计网站怎么申请自己的域名

酒店建筑设计网站,怎么申请自己的域名,武汉大学人民医院电话,郑州好的企业网站建设欢迎来到程序小院 小鸟飞呀飞 玩法&#xff1a;鼠标控制小鸟飞翔的方向&#xff0c;点击鼠标左键上升&#xff0c;不要让小鸟掉落&#xff0c;从管道中经过&#xff0c;快去飞呀飞哦^^。开始游戏https://www.ormcc.com/play/gameStart/204 html <canvas width"288&quo…

欢迎来到程序小院

小鸟飞呀飞

玩法:鼠标控制小鸟飞翔的方向,点击鼠标左键上升,不要让小鸟掉落,从管道中经过,快去飞呀飞哦^^。

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

html

  <canvas width="288" height="505"></canvas>

css

canvas {margin: 0 auto;
}

js

var game = new Phaser.Game(288, 505, Phaser.CANVAS, 'game');game.States = {};game.States.boot = function() {this.preload = function() {if(typeof(GAME) !== "undefined") {this.load.baseURL = GAME + "/";}if(!game.device.desktop){this.scale.scaleMode = Phaser.ScaleManager.EXACT_FIT;this.scale.forcePortrait = true;this.scale.refresh();}game.load.image('loading', 'assets/preloader.gif');};this.create = function() {game.state.start('preload');};
};game.States.preload = function() {this.preload = function() {var preloadSprite = game.add.sprite(34, game.height/2, 'loading');game.load.setPreloadSprite(preloadSprite);game.load.image('background', 'assets/background.png');game.load.image('ground', 'assets/ground.png');game.load.image('title', 'assets/title.png');game.load.spritesheet('bird', 'assets/bird.png', 34, 24, 3);game.load.image('btn', 'assets/start-button.png');game.load.spritesheet('pipe', 'assets/pipes.png', 54, 320, 2);game.load.bitmapFont('flappy_font', 'assets/fonts/flappyfont/flappyfont.png', 'assets/fonts/flappyfont/flappyfont.fnt');game.load.audio('fly_sound', 'assets/flap.wav');game.load.audio('score_sound', 'assets/score.wav');game.load.audio('hit_pipe_sound', 'assets/pipe-hit.wav');game.load.audio('hit_ground_sound', 'assets/ouch.wav');game.load.image('ready_text', 'assets/get-ready.png');game.load.image('play_tip', 'assets/instructions.png');game.load.image('game_over', 'assets/gameover.png');game.load.image('score_board', 'assets/scoreboard.png');};this.create = function() {game.state.start('menu');};
};game.States.menu = function() {this.create = function() {var bg = game.add.tileSprite(0, 0, game.width, game.height, 'background');var ground = game.add.tileSprite(0, game.height-112, game.width, 112, 'ground');bg.autoScroll(-10 ,0);ground.autoScroll(-100 ,0);var titleGroup = game.add.group();titleGroup.create(0, 0, 'title');var bird = titleGroup.create(190, 10, 'bird');bird.animations.add('fly');bird.animations.play('fly', 12, true);titleGroup.x = 35;titleGroup.y = 100;game.add.tween(titleGroup).to({y: 120}, 1000, null, true, 0, Number.MAX_VALUE, true);var btn = game.add.button(game.width/2, game.height/2, 'btn', function() {game.state.start('play');});btn.anchor.setTo(0.5, 0.5);};
};game.States.play = function() {this.create = function() {this.bg = game.add.tileSprite(0, 0, game.width, game.height, 'background');this.pipeGroup = game.add.group();this.pipeGroup.enableBody = true;this.ground = game.add.tileSprite(0, game.height-112, game.width, 112, 'ground');this.bird = game.add.sprite(50, 150, 'bird');this.bird.animations.add('fly');this.bird.animations.play('fly', 12, true);this.bird.anchor.setTo(0.5, 0.5);game.physics.enable(this.bird, Phaser.Physics.ARCADE);this.bird.body.gravity.y = 0;game.physics.enable(this.ground, Phaser.Physics.ARCADE);this.ground.body.immovable = true;this.soundFly = game.add.sound('fly_sound');this.soundScore = game.add.sound('score_sound');this.soundHitPipe = game.add.sound('hit_pipe_sound');this.soundHitGround = game.add.sound('hit_ground_sound');this.scoreText = game.add.bitmapText(game.world.centerX - 20, 30, 'flappy_font', '0', 36);this.readyText = game.add.image(game.width/2, 40, 'ready_text');this.playTip = game.add.image(game.width/2, 300, 'play_tip');this.readyText.anchor.setTo(0.5, 0);this.playTip.anchor.setTo(0.5, 0);this.hasStarted = false;game.time.events.loop(900, this.generatePipes, this);game.time.events.stop(false);game.input.onDown.addOnce(this.startGame, this);};this.update = function() {if(!this.hasStarted) return;game.physics.arcade.collide(this.bird, this.ground, this.hitGround, null, this);game.physics.arcade.overlap(this.bird, this.pipeGroup, this.hitPipe, null, this);if(!this.bird.inWorld) this.hitCeil();if(this.bird.angle < 90) this.bird.angle += 2.5;this.pipeGroup.forEachExists(this.checkScore, this);};this.generatePipes = function() {var gap = 150;var difficulty = 100; // difficulty越大越简单var position = 50 + Math.floor((505 - 112 - difficulty - gap) * Math.random());var topPipeY = position - 320;var bottomPipeY = position + gap;if(this.resetPipe(topPipeY, bottomPipeY)) return;var topPipe = game.add.sprite(game.width, topPipeY, 'pipe', 0, this.pipeGroup);var bottomPipe = game.add.sprite(game.width, bottomPipeY, 'pipe', 1, this.pipeGroup);this.pipeGroup.setAll('checkWorldBounds', true);this.pipeGroup.setAll('outOfBoundsKill', true);this.pipeGroup.setAll('body.velocity.x', -this.gameSpeed);};this.startGame = function() {this.gameSpeed = 200;this.gameIsOver = false;this.hasHitGround = false;this.hasStarted = true;this.score = 0;this.bg.autoScroll(-(this.gameSpeed/10), 0);this.ground.autoScroll(-this.gameSpeed, 0);this.bird.body.gravity.y = 1150;this.readyText.destroy();this.playTip.destroy();game.input.onDown.add(this.fly, this);game.time.events.start();};this.stopGame = function() {this.bg.stopScroll();this.ground.stopScroll();this.pipeGroup.forEachExists(function(pipe) {pipe.body.velocity.x = 0;}, this);this.bird.animations.stop('fly', 0);game.input.onDown.remove(this.fly, this);game.time.events.stop(true);};this.fly = function() {this.bird.body.velocity.y = -350;game.add.tween(this.bird).to({angle: -30}, 100, null, true, 0, 0, false);this.soundFly.play();};this.hitCeil = function() {this.soundHitPipe.play();this.gameOver();};this.hitPipe = function() {if(this.gameIsOver) return;this.soundHitPipe.play();this.gameOver();};this.hitGround = function() {if(this.hasHitGround) return;this.hasHitGround = true;this.soundHitGround.play();this.gameOver(true);};this.gameOver = function(show_text) {this.gameIsOver = true;this.stopGame();if(show_text) this.showGameOverText();};this.showGameOverText = function() {this.scoreText.destroy();game.bestScore = game.bestScore || 0;if(this.score > game.bestScore) game.bestScore = this.score;this.gameOverGroup = game.add.group();var gameOverText = this.gameOverGroup.create(game.width/2, 0, 'game_over');var scoreboard = this.gameOverGroup.create(game.width/2, 70, 'score_board');var currentScoreText = game.add.bitmapText(game.width/2 + 60, 105, 'flappy_font', this.score+'', 20, this.gameOverGroup);var bestScoreText = game.add.bitmapText(game.width/2 + 60, 153, 'flappy_font', game.bestScore+'', 20, this.gameOverGroup);var replayBtn = game.add.button(game.width/2, 210, 'btn', function() {game.state.start('play');}, this, null, null, null, null, this.gameOverGroup);gameOverText.anchor.setTo(0.5, 0);scoreboard.anchor.setTo(0.5, 0);replayBtn.anchor.setTo(0.5, 0);this.gameOverGroup.y = 30;};this.resetPipe = function(topPipeY, bottomPipeY) {var i = 0;this.pipeGroup.forEachDead(function(pipe) {if(pipe.y <= 0) {pipe.reset(game.width, topPipeY);pipe.hasScored = false;} else {pipe.reset(game.width, bottomPipeY);}pipe.body.velocity.x = -this.gameSpeed;i++;}, this);return i == 2;};this.checkScore = function(pipe) {if(!pipe.hasScored && pipe.y <= 0 && pipe.x <= this.bird.x - 17 - 54) {pipe.hasScored = true;this.scoreText.text = ++this.score;this.soundScore.play();return true; }return false;};
};game.state.add('boot', game.States.boot);
game.state.add('preload', game.States.preload);
game.state.add('menu', game.States.menu);
game.state.add('play', game.States.play);game.state.start('boot');

源码icon-default.png?t=N7T8https://www.ormcc.com/

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

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

http://www.shuangfujiaoyu.com/news/50436.html

相关文章:

  • wordpress用户冻结南宁seo外包服务
  • 淘宝放单网站怎么做的正规网站建设服务
  • 昆山周市建设局网站seo排名优化seo
  • 如何做产品网站推广什么叫网络营销
  • 蓝色 宽屏 网站 模板推广竞价账户托管
  • 企业网站制作模板推广什么软件可以长期赚钱
  • 可以免费做推广的网站关键词快速排名不限行业
  • dw自己做网站需要什么区别百度快速seo优化
  • 温州网站定制制作网站要找什么公司
  • 想自己做个网站怎么做百度推广官方电话
  • 12306网站很难做吗打开搜索引擎
  • 移动健康app下载排名sem优化软件
  • 云浮市住房城乡建设信息网网站优化大师的功能有哪些
  • 用什么工具做网站天猫seo搜索优化
  • 在自己电脑上做网站seo技术论坛
  • 做一手房做那个网站好如何建立网站服务器
  • 郑州百度网站建设外链购买交易平台
  • 制作公司网站的费用宣传链接怎么做
  • 东莞网站建设aj工作室站长工具网站排名
  • 凡科做的网站百度收不收录网时代教育培训机构官网
  • 做网站放什么软件品牌营销公司
  • 商务网站建设内容全网搜索指数查询
  • 网站空间的地址市场营销案例
  • 电子商务网站建设与维护读书心得营销策略有哪些4种
  • 漳浦建设局网站更新百度快照是怎么做上去的
  • 电信200m宽带做网站卡吗四年级写一小段新闻
  • 分类信息网站开发教程重庆seo和网络推广
  • 163企业邮箱登录公众号seo排名优化
  • 龙华区做网站合肥网络优化推广公司
  • 网站做外链怎么样互联网营销师培训学校