mattasaurus Posted April 23, 2018 Share Posted April 23, 2018 In the Phaser 3 examples we have an example extending Phaser.Scene like so (http://labs.phaser.io/edit.html?src=src\scenes\scene from class.js): var MyScene = new Phaser.Class({ Extends: Phaser.Scene, // [...] using ES6 we might say instead: class MyScene extends Phaser.Scene { From what I see, I think that these are functionally very similar. But I could easily have missed or misunderstood something. Are these the same in effect (or almost the same)? If there are differences, what are the significant differences? Is one preferred over the other (assuming ES6 is an option)? Link to comment Share on other sites More sharing options...
rich Posted April 23, 2018 Share Posted April 23, 2018 There are quite a few ES6 examples in the Scene folder. Just look for ES6 in the filename. Like this one: http://labs.phaser.io/view.html?src=src\scenes\scene from es6 class.js Link to comment Share on other sites More sharing options...
mattasaurus Posted April 23, 2018 Author Share Posted April 23, 2018 Now I feel a little silly. But thank you. Link to comment Share on other sites More sharing options...
rich Posted April 23, 2018 Share Posted April 23, 2018 On the plus side, your guess was right Link to comment Share on other sites More sharing options...
Recommended Posts