Tell us what’s happening:
player.position.x - player.width <= checkpoint.position.x - checkpoint.width + player.width * 0.9
checkpoint[index].claimed === true
Whats’s wrong with this code?
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
player.position.x - player.width <= checkpoint.position.x - checkpoint.width + player.width * 0.9
checkpoint[index].claimed === true
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Mobile/15E148 Safari/604.1
Challenge Information:
Learn Intermediate OOP by Building a Platformer Game - Step 112