Jump to content

Reload DOM from cache


Felipecb93
 Share

Recommended Posts

Hi, I'm new to phaser 3 and I'm struggling with something, if someone has any idea of how I can solve this it would be awesome.

I'm using a dom element (A table with php) to show a score ranking when my game ends, I do load.html() in the preload and call it in create via add.dom( x, y ).createFromCache()

It works perfectly the first time the player plays, my problem is that I need to give the player the option to play again so I have a button to restart, and the 2nd time and so on that the player gets to the final scene, the score table is the same because is cached from the first time. I would like to know if there's some kind of way to refresh that item from the cache or reload it again.

I tried some ways like destroy() and scene.restart() but it didn't work.

Thank you.

Link to comment
Share on other sites

  • 1 year later...
 Share

  • Recently Browsing   0 members

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