Added ceiling to jump calculations, increased the features available when displaying devtools and fixed the toggle glitch

This commit is contained in:
rain
2023-11-16 21:36:27 -06:00
parent 1eef69f514
commit 8013ba262a
6 changed files with 114 additions and 14 deletions
+2 -2
View File
@@ -43,8 +43,8 @@ export class Zombie {
this.speedY += this.map.gravity;
// if skipping the platform when falling, set to platform
if(this.y <= floor && this.y+this.speedY >= floor) {
this.y = floor;
if(this.y+this.height <= floor && this.y+this.height+this.speedY >= floor) {
this.y = floor-this.height;
this.speedY = 0;
} else {
this.y += this.speedY;