You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
498 B
JavaScript
21 lines
498 B
JavaScript
5 years ago
|
class Burger {
|
||
|
constructor(x, y) {
|
||
|
this.sprite = createSprite(x, y, 32, 32);
|
||
|
this.sprite.velocity.y = -5;
|
||
|
this.image = Images.burger;
|
||
|
}
|
||
|
|
||
|
update() {
|
||
|
// this.sprite.velocity.x = this.joyX * 10;
|
||
|
// this.sprite.velocity.y = this.joyY * -10;
|
||
|
}
|
||
|
|
||
|
draw() {
|
||
|
tint(Colors.Purple);
|
||
|
image(this.image, this.sprite.position.x-16, this.sprite.position.y-16, 32, 32);
|
||
|
strokeWeight(4);
|
||
|
stroke('#FF0000');
|
||
|
point(this.sprite.position.x, this.sprite.position.y);
|
||
|
}
|
||
|
}
|