Larry

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. I managed to fix it. Turns out it was just a pathing issue. Thanks guys.
  2. This is my first time hosting a game. I have all the files up on GitHub and they all work when I run them locally, but when I go to the GitHub link I get these errors: Failed to load resource: the server responded with a status of 404 () - phaser.min.js Uncaught ReferenceError: Phaser is not defined at main.js:3
  3. I'm trying to create platforms for my player to jump onto and also make collectible stars. I can create these sprites using functions, but I don't know how to make physics work on them so that the character can jump on the platforms and overlap with the stars. The problem is that the physics portion doesn't work when I call it in the update function. I am also not using tilesprites, so it can't work that way. create: function() { addStar(star1); }, update: function() { removeStar(star1); } addStar(name) { name = game.add.sprite(1700, 550, 'star'); name.anchor.setTo(0.5, 0.5); this.game.physics.enable(name, Phaser.Physics.ARCADE); name.body.collideWorldBounds = false; name.enableBody = true; name.body.immovable = true; } removeStar(name) { if (game.physics.arcade.overlap(character, name) == true) { name.destroy(); updateScore(); } }