dgodov Posted September 14, 2014 Share Posted September 14, 2014 Hello! Can you help me with Group class inheritance?I was playing around without success. A code snippet would be a great help Thanks! Link to comment Share on other sites More sharing options...
eguneys Posted September 14, 2014 Share Posted September 14, 2014 Take a look at my example Phaser project.function CustomGroup(game, parent) { Phaser.Group.call(this, game, parent);}CustomGroup.prototype = Object.create(Phaser.Group.prototype);CustomGroup.prototype.constructor = CustomGroup;CustomGroup.prototype.customFunction = function() {}; Link to comment Share on other sites More sharing options...
lewster32 Posted September 15, 2014 Share Posted September 15, 2014 There's also an official example: http://examples.phaser.io/_site/view_full.html?d=groups&f=extending+a+group.js&t=extending%20a%20group dgodov 1 Link to comment Share on other sites More sharing options...
Recommended Posts