phaserjs / phaser-ce

Phaser CE is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
http://phaser.io
MIT License
1.34k stars 491 forks source link

Creature json safety fix #604

Closed rroylance closed 5 years ago

rroylance commented 5 years ago

This PR

Describe the changes below: Simply uses the clone parameter of Phaser.Cache.getJSON to prevent the Creature runtime modifying the JSON object you give it from the Phaser.Cache making subsequent uses of that JSON not behave in various ways, depending on how you use the runtime (when having multiple Creature objects of the same character for example)