forked from sent/waves
14 lines
232 B
JavaScript
14 lines
232 B
JavaScript
function Button(config) {
|
|
|
|
var parent = new jaws.Sprite(config),
|
|
key;
|
|
|
|
for (key in parent) {
|
|
this[key] = parent[key];
|
|
}
|
|
}
|
|
|
|
Button.prototype.isClicked = function(x, y) {
|
|
return this.rect().collidePoint(x, y);
|
|
};
|