Jump to content

Search the Community

Showing results for tags 'global state'.

  • 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 Phaserists! I just started out with Phaser, and was wondering if there's a built-in way to have a global state object. What I mean is an object whose preload, update, create and render methods are always called, regardless of which other state the game is currently in. I've solved it by having a singleton object with the needed methods, which I always import into my state files (I use ES6). Then I can call its methods from the respective methods of the real state. While this solution isn't bad, it would be useful to have a built-in way to declare a global state object, maybe something like game.setGlobalState(myStateObject)// ornew Phaser.Game(..., myStateObject)Something to consider?
×
×
  • Create New...