MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / IsPlayerOnGround

Method IsPlayerOnGround

Player.js:902–912  ·  view source on GitHub ↗
(currentLines)

Source from the content-addressed store, hash-verified

900 }
901
902 IsPlayerOnGround(currentLines) {
903 this.currentPos.y += 1;
904 for (let i = 0; i < currentLines.length; i++) {
905 if (currentLines[i].isHorizontal && this.IsCollidingWithLine(currentLines[i])) {
906 this.currentPos.y -= 1;
907 return true;
908 }
909 }
910 this.currentPos.y -= 1;
911 return false;
912 }
913
914 IsPlayerOnDiagonal(currentLines) {
915 this.currentPos.y += 5;

Callers 2

CheckCollisionsMethod · 0.95
UpdatePlayerRunMethod · 0.95

Calls 1

IsCollidingWithLineMethod · 0.95

Tested by

no test coverage detected