Skip to content

Phaser.Device - inverted from Game #1328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 14, 2014
Merged

Conversation

pnstickne
Copy link
Contributor

The only known breaking change is if user-code relied on device.game or
manually called checkFullScreenSupport, as both have been removed.

  • Phaser.Device is now a singleton object that does not belong to a
    particular game. The only thing that it belongs to is the window/host
    context.
    • game.device (shared between all games) and Phaser.Device are the
      same object.
    • There is no more Device#game property.
  • The specific device-ready detection is moved out of Game into the Device
    code
    • It is possible for multiple Games (or even non-Games) to use
      Device.whenReady.
    • Initialization is done immediately upon device-ready; there is an
      onInitialized signal that is dispatched that can be subscribed to
      extend the default initialization.
  • The fullscreen-detection code (that was the only dependent of game) now
    uses an new element.
  • Updated jsdoc documentation

The only known breaking change is if user-code relied on `device.game` or
manually called `checkFullScreenSupport`, as both have been removed.

- Phaser.Device is now a singleton object that does not belong to a
  particular game. The only thing that it belongs to is the window/host
  context.
  - `game.device` (shared between all games) and `Phaser.Device` are the
    same object.
  - There is no more `Device#game` property.

- The specific device-ready detection is moved out of Game into the Device
  code
  - It is possible for multiple Games (or even non-Games) to use
    `Device.whenReady`.
  - Initialization is done immediately upon device-ready; there is an
    onInitialized signal that is dispatched that can be subscribed to
    extend the default initialization.

- The fullscreen-detection code (that was the only dependent of game) now
  uses an new element.

- Updated jsdoc documentation
- Removed useless arguments
@photonstorm
Copy link
Collaborator

@pnstickne would you mind dropping me an email please? ([email protected]) (it's nothing to do with this PR specifically btw)

photonstorm added a commit that referenced this pull request Nov 14, 2014
Phaser.Device - inverted from Game
@photonstorm photonstorm merged commit 497a9ec into phaserjs:dev Nov 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants