jdotrjs / phaser3-nineslice

A Nineslice plugin for Phaser 3
Other
108 stars 28 forks source link

Multiple nineslice assets from same atlas defaults to first used #11

Closed DannyT closed 6 years ago

DannyT commented 6 years ago
this.first9slice = this.add.nineslice(
    100, 100,
    100, 100,
     {
         key:'atlas',
         frame: 'first-box.png'
     },
    10
);

this.second9slice = this.add.nineslice(
    300, 100,
    100, 100,
     {
         key:'atlas',
         frame: 'second-box.png'
     },
    10
);

In this example, both boxes will currently use the first's texture frame.

jdotrjs commented 6 years ago

Woo. I feel super clever; I had actually already identified this as a potentially issue. Closing as a dupe of https://github.com/jdotrjs/phaser3-nineslice/issues/6