Jump to content

Custom events inside Sprite.events yay or nay?


cloakedninjas
 Share

Recommended Posts

Is it good practice to do the following:

 

this.events.onBloomOver = new Phaser.Signal();;

 

Or should the events property be left for Phaser's own events only?

 

And if it's ok - Since I'm using Typescript, how can I get around Webstorm complaining about Unresolved variable onBloomOver - some sort of Interface?

 

 

 

Link to comment
Share on other sites

Speaking from the JavaScript side of things, I don't see a problem with it. But we're more loosey-goosey with our dynamic-ness and weakly-typed-ness. ( ;

 

I guess I'd be more worried that I'd override a built-in Phaser event if a new event shows up there in a Phaser upgrade.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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