Jump to content

Sam987X

Members
  • Content Count

    8
  • Joined

  • Last visited

  1. Hi ive been making a game with phaser and ive set out my game to have each game state a separate java-script and then loads the js file when it needs game.add.tween(BlackFade).to( {alpha: 1}, 100, "Linear", true ) console.log(BlackFade.alpha) if (BlackFade.alpha >= 0.9 ){game.state.start('endGame');} WebSocket connection to 'ws://localhost:8125/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED VM143:870 This is the error i get ^^
  2. Hi i'm quite new with phaser but i'm making a game at the moment for a class project and i was wondering if their is a way to choose a specific sprite from a group of sprites.like maybe by order of how they were created or something . any help would be much appreciated
  3. Hi i'm quite new to phaser but ive been making this game for a school project where you control a helicopter and when the helicopter body collides with the water refill building it refills the water but if i go up against the side of the building and change direction it flips my helicopter so that it flys the other direction which then makes the helicopter overlapping the water refill building and my game crashes and i get this error Game.js:342 Uncaught ReferenceError: refill is not defined at Function.<anonymous> (Game.js:342) at Phaser.Physics.Arcade.collideSpriteVsSprite
  4. Hi in my game i have got it so that when i click on the screen it will toggle full screen and it works perfectly without any problems but when i go and debug my code i get these errors .Any help would be much appreciated Uncaught TypeError: Cannot read property 'dispatch' of undefined at Phaser.ScaleManager.fullScreenChange (phaser.js:37411) at HTMLDocument._fullScreenChange (phaser.js:36175) WebSocket connection to 'ws://localhost:8125/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED game.scale.fullScreenScaleMode = Phaser.ScaleManager.SHOW_ALL;
  5. Hi so im using phaser trying to get my program to subtract 1 from my varriable every second, how do i go about doing this im trying to use somthing like this var CountDownTime = 3 function GameStartCountDown(CountDownTime){ CountDownTime -- } setInterval(GameStartCountDown, 1000)
  6. Yes this worked thank you !
  7. I added in the code but my building bodys are not bigger than the image
  8. Hi i am quite new to phaser, but I've been making this game and in my game i have the player dropping water from a helicopter on burning buildings, the program spawns 5 buildings then adds them to the group buildings and in my update function it checks when the water is overlapping the buildings it will destroy the water, it does this but the water gets destroyed if i drop the water between buildings and also destroys it at the same height regardless of how tall the buildings are. Any help would be much appreciated ps i included a picture of my game at the moment to give you an ide
×
×
  • Create New...