Jump to content

Check if atlas frame exists


Croweley
 Share

Recommended Posts

  • 2 months later...
  • 5 years later...

Very late reply, but I was looking for a solution to the same issue. I don't think nemoDreamer's anser would work, it seems to just look for an image, not texture atlas frame.

I'd also avoid using underscore as in the first reply, but you can do something with Phaser only methods like this:

function hasFrameName ( { atlasName, frameName } ) {
  return this.state.cache.getFrameData( atlasName ).checkFrameName( frameName )
}

 

Edited by Anatol
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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