Jump to content

Resize method not firing? At all?


whalleyrulz
 Share

Recommended Posts

Hey, I'm kind of stuck trying to work out what's happening with my game.  I've been having issues getting my game responsive, so I tried... well, everything I can think of, really.  I've brought my game all the way down to four near-empty files; boot.js, preload.js, menu.js and app.js, and I'm getting nothing on resize events.

I'm using Phaser 2.6.2, I've got "this.scale.setMode = Phaser.ScaleManager.RESIZE" in my boot.js's init function, I've got a resize handler in my menu just titled 'resize' with nothing but "console.log('resize')" inside of it, and nothing happens on resize.  I don't understand at all.  I found a guide someone put together that has really similar architecture to my project (http://www.netexl.com/blog/making-of-a-responsive-game-in-phaser-part-2/) and even looking at that person's game.js in dev tools and comparing against my game, I can't see how we differ (outside of me keeping my various methods in separate files) or how I've screwed up.  Resize just plain doesn't fire on my project, even when it's as simple as logging something to console.  Note: I'm able to get other things to log to console just fine, it's just that the resize method doesn't do what it's supposed to do.

I'd like to be able to show the whole code for my project if possible, but I fully understand why that's not - if it helps, I can stick all my barebones stuff into a single file and huck it up on jsbin or something similar.  Still - does anyone have any clue where I could start looking as to why setting my ScaleManager to RESIZE doesn't fire my resize command?

Link to comment
Share on other sites

  • 5 months later...

sorry guys in my opinion this methods is so expencive, recalculate the scale of all sprites... could you have another strategy to scale entire canvas?.... @whalleyrulz could you give and examples?...I need scale and resize my entire game in differents screens..please help me I prove alll escenarios and doesnt work thanks.

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...