lower enemies, crossed eyes of gamechar

This commit is contained in:
Mottributo 2023-03-27 00:02:55 +03:00
parent 2daca56a91
commit c448e28223

View File

@ -92,6 +92,13 @@ function GameCharacter() {
}
this._drawEyes = function (draw_left, draw_right, eyes_height) {
fill(0);
if (this.curLives <= 0) {
textAlign(CENTER);
textSize(this.x_step*2);
text("x", this.x - this.x_step * 1.2, this.y - this.y_step * eyes_height);
text("x", this.x + this.x_step * 1.2, this.y - this.y_step * eyes_height);
}
else {
if (draw_left) {
ellipse(
this.x - this.x_step * 1.2,
@ -109,6 +116,7 @@ function GameCharacter() {
);
}
}
}
this._updateSprite();
push();
strokeWeight(1);
@ -669,7 +677,7 @@ function generateObjects() {
max(
random(
prev.y - prev.max_y_deviation,
floorPos_y - prev.max_y_deviation,
floorPos_y - prev.max_y_deviation/2,
),
height / 8,
),