var Class = require('../utils/Class'); var Components = require('../components'); var GameObject = new Class({ initialize: function GameObject(state, type){ this.state = state; this.id = 0; this.type = type; this.name = ''; this.tabIndex = -1; this.parent; this.renderMask = 15; this.renderFlags = 15; } , preUpdate: function (){ } , toJSON: function (){ return Components.ToJSON(this); } , destroy: function (){ this.parent.remove(this); this.state = undefined; } } ); module.exports = GameObject;