Editing Gun.js - align gun
This commit is contained in:
parent
035cd541a0
commit
687009f8fc
|
@ -31,7 +31,7 @@ class Gun extends Subject {
|
||||||
noCursor();
|
noCursor();
|
||||||
|
|
||||||
if (this.cursorImg) {
|
if (this.cursorImg) {
|
||||||
image(this.cursorImg, mouseX, mouseY, CURSOR_SIZE, CURSOR_SIZE);
|
image(this.cursorImg, mouseX - CURSOR_SIZE / 2, mouseY - CURSOR_SIZE / 2, CURSOR_SIZE, CURSOR_SIZE);
|
||||||
} // custom cursor
|
} // custom cursor
|
||||||
|
|
||||||
for (let bullet of this.bullets) {
|
for (let bullet of this.bullets) {
|
||||||
|
@ -40,8 +40,8 @@ class Gun extends Subject {
|
||||||
|
|
||||||
this.bullets = this.bullets.filter(bullet => bullet.visible); // clean up bullet holes
|
this.bullets = this.bullets.filter(bullet => bullet.visible); // clean up bullet holes
|
||||||
}
|
}
|
||||||
|
|
||||||
shoot() {
|
shoot() {
|
||||||
if (this.remainingShots > 0) {
|
if (this.remainingShots > 0) {
|
||||||
this.remainingShots--;
|
this.remainingShots--;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user