Created
July 25, 2015 21:58
-
-
Save GraemeFulton/834decdede1f3eb8b353 to your computer and use it in GitHub Desktop.
Update x positions, the same way z is
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//x positions | |
else if((this.floor[i].position.x - this.tileWidth)>camera.position.x){ | |
this.floor[i].position.x-=(this.tileWidth*2); | |
} | |
//if the camera has moved past the entire square in the opposite direction, move the square the opposite way | |
else if((this.floor[i].position.x + this.tileWidth)<camera.position.x){ | |
this.floor[i].position.x+=(this.tileWidth*2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment