var Class = require('../utils/Class'); var Components = require('./components'); var GameObject = new Class({ initialize: function GameObject(scene, type){ this.scene = scene; this.type = type; this.name = ''; this.active = true ; this.tabIndex = -1; this.parent; this.renderMask = 15; this.renderFlags = 15; this.input = null ; this.scene.sys.sortChildrenFlag = true ; } , setActive: function (value){ this.active = value; return this; } , update: function (){ } , setInteractive: function (shape, callback){ this.scene.sys.inputManager.enable(this, shape, callback); return this; } , toJSON: function (){ return Components.ToJSON(this); } , destroy: function (){ this.parent.remove(this); this.scene = undefined; } } ); module.exports = GameObject;