tvance929

Members
  • Content Count

    6
  • Joined

  • Last visited

About tvance929

  • Rank
    Newbie

Contact Methods

  • Twitter
    @tvance929
  1. Good point, thanks so much for this awesome framework! It's been like an early Christmas present for me!
  2. So many awesome examples here...cant wait to see them in the examples page! I was going to submit a STATEs one as well but saw that Jerome already had.
  3. Perfect...thank you! I think I'll just do this in my UPDATE of mainMenu... unless someone sees a terrible problem with it. update: function () { if (this.music.isDecoding) { this.mainMenuStart.visible = false; this.highScores.visible = false; } else { this.preloadBar.destroy(); this.mainMenuStart.visible = true; this.highScores.visible = true; } },
  4. So I am starting a loop at the beginning of the game... IF I click the NEW GAME text before the loop starts... then my loop starts on the next stage. Ive tried rearranging when the music gets started as opposed to the text mouse events but no go ... *** I CAN OVERCOME this by checking for the loop to be playing in the next stages UPDATE function and stopping it in there... but it just feels like I am doing something wrong....? http://toddvance.com/phaser/flappyBird/ <-- commented out the fix so you can see ... click 'Start Game' quickly to see what is happening. IF YOU WAIT for the music to start and THEN move on (start game OR high scores) the music stops appropriately. preload: function () { game.load.audio('loopGameStart', ['assets/GameStart.mp3', 'assets/GameStart.ogg']); game.load.image('logo', 'assets/BigBird.png'); }, create: function () { this.music = game.add.audio('loopGameStart', 1, true); this.music.play('', 0, 1, true); this.game.add.tween(logo.scale).to({ x: 1, y: 1 }, 2000, Phaser.Easing.Bounce.Out, true); this.mainMenuStart = this.game.add.text(game.world.centerX, game.world.centerY + 100, "Start Game", { font: "50px Arial", fill: "#000", align: "center" }); this.mainMenuStart.anchor.set(0.5); this.mainMenuStart.inputEnabled = true; this.mainMenuStart.events.onInputDown.add(this.down, this); this.mainMenuStart.events.onInputOver.add(this.over, this); this.mainMenuStart.events.onInputOut.add(this.out, this); this.highScores = this.game.add.text(game.world.centerX, game.world.centerY + 150, "High Scores", { font: "50px Arial", fill: "#000", align: "center" }); this.highScores.anchor.set(0.5); this.highScores.inputEnabled = true; this.highScores.events.onInputDown.add(this.down, this); this.highScores.events.onInputOver.add(this.over, this); this.highScores.events.onInputOut.add(this.out, this); }, down: function (item) { this.music.loop = false; this.music.stop(); switch (item.text) { case 'Start Game': game.state.start('mainGameState'); break; case 'High Scores': game.state.start('highScoresState'); }
  5. .total worked for me ... very obvious. Sorry for the dumb question.
  6. Total newb question and I would have guessed this would have been asked before but I cant find it in a search. I simply want to know when all my stars have been gobbled up in my stars group ( from the Photon tutorial) ... can't seem to find a method I see that I have a children array and there is a lifespan property that might tell me what I want so I could loop through that but I am assuming there is a 'right' way to do this. Thanks!