var Class = require('../utils/Class'); var InteractiveObject = new Class({ initialize: function InteractiveObject(gameObject, hitArea, hitAreaCallback){ this.gameObject = gameObject; this.enabled = true ; this.draggable = false ; this.hitArea = hitArea; this.hitAreaCallback = hitAreaCallback; this.localX = 0; this.localY = 0; } , onUp: function (gameObject, pointer, x, y){ } , onDown: function (gameObject, pointer, x, y){ } , onOver: function (gameObject, pointer, x, y){ } , onOut: function (gameObject, pointer){ } , onMove: function (gameObject, pointer, x, y){ } , destroy: function (){ this.gameObject = undefined; this.hitArea = undefined; this.hitAreaCallback = undefined; } } ); module.exports = InteractiveObject;