0
Why is the player not displayed?
https://code.sololearn.com/WJbZ8m8VXDyz/?ref=app I made this game that the player must push the stone to the indicator point in order to win. 1. The player i made wasnt really displayed when it stepped on the tile. But once i moved it out of the tile it appeared. 2. I provided customization of the tile so if you change from 1 to 0 the tile you step on wont appear and the collision between the player and the tile will occur but the camera kept zooming in and didnt follow where the player stood. How can i solve the problem above?
4 Réponses
+ 1
In the draw function you're rendering the player first and all other objects after, which does the last rendered objects appears up front.
The solution is to call player.draw() at the end of your rendering pipeline, after your rendered all the other objects. Place player.draw() and player.update() after points.forEach (line 94).
+ 1
As I said bro, in your main draw() the function, remove the calls player.draw() and player.update() from that place (lines 79 and 80), and place them just before your checking logic, at line 94.
0
How can i solve that if so?
0
Its now working. Thanks for answering!