Search the Community

Showing results for tags 'boss fight'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. I am working on a boss movement method. The idea is that every 8 seconds the method will be called from the create method, this may be part of the problem... The idea is that every 8 seconds the method will be called. The boss will appear from one side of the screen and exit to the other. The bosses y coord will be based on where players y coord. The issue I am running into is that when the level starts the boss starts moving before 8 seconds goes across the screen to exit and is never seen again. I am not moving the player during the test so the bird isn't going beyond the y screen parameters. The console is only logging the side once so it only seem to be getting called once. My relevant code below: // inside the create method this.blueBirds = this.add.group(); this.blueBirds.enableBody = true; this.multiBlueBirdFlight = this.game.time.events.loop(Phaser.Time.SECOND * 8, this.flyBlueBird(), this); // inside the game state flyBlueBird: function () { var blueBird = this.blueBirds.getFirstExists(); if (!blueBird) { blueBird = this.blueBirds.create(this.X_MIN, this.player.y -100, 'blueBird'); blueBird.anchor.setTo(0.5); blueBird.customParams = {}; blueBird.customParams.side = 'left' blueBird.body.allowGravity = false; blueBird.animations.add('flying', [0,1,2,3], 5, true); } if (blueBird.customParams.side == 'left') { blueBird.reset(this.X_MIN , this.player.y - 100) blueBird.body.velocity.x = 100; blueBird.body.velocity.y = -10; blueBird.customParams.side = 'right'; } else { blueBird.reset(this.X_MAX + 50, this.player.y - 100); blueBird.body.velocity.x = -100; blueBird.body.velocity.y = -10; blueBird.customParams.side = 'left'; } blueBird.play('flying') console.log(blueBird.customParam.side) }