Jump to content

Filters and switching states


Yora
 Share

Recommended Posts

I'm trying to make use of the new filters (which are all badass btw  :lol:) and have it set up in a menu state.  The first time the menu state loads, everything works fine.  Upon the leaving and returning to that menu state, there's nothing but blackness on the screen but the state is still functional (can press buttons where they would be etc).  

 

I tried to .destroy the filter before switching states and get this: 

  1. Uncaught TypeError: Cannot read property 'time' of null  phaser.js:10181  

 

If I try to .kill the sprite it's attached to it'll be removed, but then I'll see the next state screen for only a split second before I get the same black screen over the game.

 

Not sure how I should properly handle this, thanks for any help.   ;)

Link to comment
Share on other sites

There was a bug in Pixi and Phaser that was stopping filters from being removed correctly. This is was fixed in the 1.1.4 dev branch a week or so ago. If your game is using tilemaps don't blindly upgrade to 1.1.4 though. Instead look for the relevant commit and update just those files instead.

Link to comment
Share on other sites

Thanks for the reply.  I updated to dev and poked around a bit and was able to get it to work, but only by setting the sprites filter to null.  Calling .destroy on the sprite resulted in the black screen like before, but I'm glad it's working by setting null anyhow.  :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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