Jump to content

Search the Community

Showing results for tags 'state change phaser buttons'.

  • 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 Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

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. Hello Hive! I've implemented a selection menu for my game in which I create a few buttons, one of which starts the actual game. Game.SelectionMenu.prototype = { init:function(levelData){ this.levelData = levelData; }, create:function(){ var button = this.add.button(x, y, 'startButton', this.startGame, this); }, startGame:function(){ this.state.start('Game', true, false, this.levelData); } } The problem arises when I navigate back to the selection menu: ... navigateBack:function(){ this.state.start('SelectionMenu', true, false, this.levelData); } ... The button appears (and even animates) but no longer fires when pressed. Is there some way to reset the state? Or is there something I'm missing about destroying a state once you leave it. I've tried: this.state.restart but this doesn't seem to fix the issue. I'm working with Phaser 2.4.2. Altara Thanks in advance, guys!
×
×
  • Create New...