You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
777 B

2 years ago
"use strict";
class Ball extends Decoration {
constructor(properties) {
super(properties);
this.createGraphics();
}
createGraphics() {
let img = images['ball'];
this.graphics = p.createGraphics(img.width, img.height);
this.updateColor();
}
updateColor() {
let img = images['ball'];
this.graphics.clear();
this.graphics.tint(this.colors[0]);
this.graphics.image(img, 0, 0);
}
display(pos, dim) {
super.display(pos, dim);
p.image(this.graphics, 0, 0, this.radius * 2, this.radius * 2);
if (this.mouseIsOver) {
this.brightness(70);
}
p.pop();
}
update() {
super.update();
}
}
//# sourceMappingURL=ball.js.map