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

Method IsPlayerOnDiagonal

Player.js:914–924  ·  view source on GitHub ↗
(currentLines)

Source from the content-addressed store, hash-verified

912 }
913
914 IsPlayerOnDiagonal(currentLines) {
915 this.currentPos.y += 5;
916 for (let i = 0; i < currentLines.length; i++) {
917 if (currentLines[i].isDiagonal && this.IsCollidingWithLine(currentLines[i])) {
918 this.currentPos.y -= 5;
919 return true;
920 }
921 }
922 this.currentPos.y -= 5;
923 return false;
924 }
925
926 GetPriorityCollision(collidedLines) {
927

Callers 1

UpdatePlayerSlideMethod · 0.95

Calls 1

IsCollidingWithLineMethod · 0.95

Tested by

no test coverage detected