Search the Community

Showing results for tags 'phaser states'.



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
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • 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 2 results

  1. Hi guys! So this is probably an easy question to answer, but everything I tried so far broke my code. So I am using states MMM.MainGame = function(game){ } MMM.MainGame.prototype = { create: function() { .... }; The issue that I am having is that I will not have that many states, besides booting, preloading, and the actual game, so my main game file is already getting pretty big with 100 lines alone for zooming in and out. Is there a way to export these functions somehow to external js files and put them together in the MainGame.prototype? Something like extends? I need some good practice advice here, because my main file will otherwise easily become thousands of lines and just one messy hell.
  2. Hello everyone, I'm trying to test some state features in Phaser, but I got some problem here. I need to bind a call to a function for loading next state when user click on a button, i.e: BasicGame.MainMenu.prototype = { create: function () {[...] this.gameTitle.events.onInputDown.add( this.startgame, this); }, startgame: function () { alert("ok"); this.state.start('reception'); }, [...]}All seems ok but when I try to load page, nothing happens inside the "startgame" block (I expected to see "ok" alert, btw). What am I doing wrong, or what is the right way of doing this? Thanks in advance!