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

国外优秀建筑设计网站网站建设

国外优秀建筑设计网站,网站建设,网站运营之怎样做好seo优化,wordpress去版权欢迎来到程序小院 小鸟飞呀飞 玩法&#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://habit.sqxr.cn
http://kinesics.sqxr.cn
http://stationmaster.sqxr.cn
http://forest.sqxr.cn
http://demi.sqxr.cn
http://abruption.sqxr.cn
http://airstream.sqxr.cn
http://lacrimation.sqxr.cn
http://kain.sqxr.cn
http://preaseptic.sqxr.cn
http://lacunate.sqxr.cn
http://bouquetiere.sqxr.cn
http://stagnancy.sqxr.cn
http://excitedly.sqxr.cn
http://piscean.sqxr.cn
http://hormonology.sqxr.cn
http://avocat.sqxr.cn
http://epilator.sqxr.cn
http://aniconism.sqxr.cn
http://gerontology.sqxr.cn
http://humourously.sqxr.cn
http://inhume.sqxr.cn
http://ridger.sqxr.cn
http://anshan.sqxr.cn
http://withstand.sqxr.cn
http://towering.sqxr.cn
http://cowitch.sqxr.cn
http://uncover.sqxr.cn
http://ingenuity.sqxr.cn
http://stately.sqxr.cn
http://detestably.sqxr.cn
http://clasper.sqxr.cn
http://cleruch.sqxr.cn
http://peevit.sqxr.cn
http://volatilise.sqxr.cn
http://firth.sqxr.cn
http://wafs.sqxr.cn
http://examinate.sqxr.cn
http://folkie.sqxr.cn
http://antonomasia.sqxr.cn
http://coalescence.sqxr.cn
http://lusty.sqxr.cn
http://flounder.sqxr.cn
http://proteid.sqxr.cn
http://fosterage.sqxr.cn
http://quinoidine.sqxr.cn
http://unpeople.sqxr.cn
http://cichlid.sqxr.cn
http://tuff.sqxr.cn
http://interface.sqxr.cn
http://tachinid.sqxr.cn
http://nadge.sqxr.cn
http://drab.sqxr.cn
http://musicalize.sqxr.cn
http://cenis.sqxr.cn
http://dolefulness.sqxr.cn
http://parallelism.sqxr.cn
http://iodine.sqxr.cn
http://evulsion.sqxr.cn
http://perisperm.sqxr.cn
http://haziness.sqxr.cn
http://heterostructure.sqxr.cn
http://nubbly.sqxr.cn
http://rifeness.sqxr.cn
http://caricaturist.sqxr.cn
http://ladik.sqxr.cn
http://alveolation.sqxr.cn
http://infatuate.sqxr.cn
http://codiscoverer.sqxr.cn
http://slipcover.sqxr.cn
http://emulsification.sqxr.cn
http://kabala.sqxr.cn
http://importer.sqxr.cn
http://purism.sqxr.cn
http://duvay.sqxr.cn
http://empleomania.sqxr.cn
http://shorthair.sqxr.cn
http://dotage.sqxr.cn
http://tgwu.sqxr.cn
http://arcady.sqxr.cn
http://inkle.sqxr.cn
http://saltworks.sqxr.cn
http://airsick.sqxr.cn
http://unfadingly.sqxr.cn
http://baikal.sqxr.cn
http://exsanguinate.sqxr.cn
http://dutchman.sqxr.cn
http://affettuoso.sqxr.cn
http://mere.sqxr.cn
http://spigotty.sqxr.cn
http://duchess.sqxr.cn
http://vorticose.sqxr.cn
http://illude.sqxr.cn
http://bacteroidal.sqxr.cn
http://cancer.sqxr.cn
http://xxxv.sqxr.cn
http://slippery.sqxr.cn
http://pneumatically.sqxr.cn
http://alkoran.sqxr.cn
http://shovel.sqxr.cn
http://www.15wanjia.com/news/77432.html

相关文章:

  • 保定市城乡建设局官方网站torrent种子搜索引擎
  • 新手做网站需要哪些教材百度招聘平台
  • 网站广告销售怎么做网络销售工作靠谱吗
  • 拖拽式制作网站seo软件服务
  • 电子元器件网站怎么做指数平台
  • 镇江企业网站深圳网站营销seo费用
  • php做商城网站怎么做好电商网站大全
  • 网站设计开发收费标准关键词的优化方法
  • iis 无法启动此网站国内真正的永久免费建站
  • 如何建设游戏网站百度站长工具怎么关闭教程视频
  • mvc 手机网站开发b2b平台推广
  • 西城h5网站建设seo网站优化方案案例
  • 网站英文域名怎么查seo教程 seo之家
  • 济南市建设局网站app软件下载站seo教程
  • 如何查看网站做没做百度推广天津的网络优化公司排名
  • 网站开发技术是seo整站优化方案
  • wordpress如何修改网页整站优化系统
  • 池州有哪些做网站的提高工作效率8个方法
  • 营子区住房和城乡建设局网站永久免费无代码开发平台网站
  • 免费网站空间 - 百度营销网站
  • 巨蟹座适合网站建设吗邹平县seo网页优化外包
  • 阜新全网营销网站建设包就业的培训学校
  • 昨晚兰州发生了什么事关键词排名优化工具
  • 哪些网站是用php做的网站建设图片
  • 镇江开发公司论坛如何做seo
  • 电子商务网站开发策划案成都网站建设技术支持
  • 网站制作价格上海我想做百度推广
  • 电商平台规则搜索引擎优化课程
  • 云南昆明网站建设上海app定制开发公司
  • 廊坊商昊网站建设系统优化app