Felipecb93 Posted June 25, 2020 Share Posted June 25, 2020 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 More sharing options...
Maxicl Posted August 25, 2021 Share Posted August 25, 2021 I'm no expert in this but this page may be useful.. https://rexrainbow.github.io/phaser3-rex-notes/docs/site/domelement/ you can do createFromHtml() instead of from cache, so I'm guessing you can put in the players' results into the html string from the code every time. But with php, I don't know. Did you have any solutions in 2021? Link to comment Share on other sites More sharing options...
Recommended Posts