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) { this._drawEyes = function (draw_left, draw_right, eyes_height) {
fill(0); 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) { if (draw_left) {
ellipse( ellipse(
this.x - this.x_step * 1.2, this.x - this.x_step * 1.2,
@ -109,6 +116,7 @@ function GameCharacter() {
); );
} }
} }
}
this._updateSprite(); this._updateSprite();
push(); push();
strokeWeight(1); strokeWeight(1);
@ -669,7 +677,7 @@ function generateObjects() {
max( max(
random( random(
prev.y - prev.max_y_deviation, prev.y - prev.max_y_deviation,
floorPos_y - prev.max_y_deviation, floorPos_y - prev.max_y_deviation/2,
), ),
height / 8, height / 8,
), ),