1 decade ago by spinz89
Hi everyone!
My first post here. I recently purchased impactjs and I'm exploring it a little bit now.
Therefor I'm making a little platform game. The player will be able to use an elevator to get to another platform. The elevator should only move up or down when the player stands in it. So I used the .check function to enable it (elvCollision = true) but I found no way to set the variable back to false.
I thought of something like 'isn't colliding with entity', but I found nothing in the forum nor the documentation.
Thanks in advance! :)
My first post here. I recently purchased impactjs and I'm exploring it a little bit now.
Therefor I'm making a little platform game. The player will be able to use an elevator to get to another platform. The elevator should only move up or down when the player stands in it. So I used the .check function to enable it (elvCollision = true) but I found no way to set the variable back to false.
I thought of something like 'isn't colliding with entity', but I found nothing in the forum nor the documentation.
Thanks in advance! :)
// CHECK IF THE PLAYER (TYPE.A) COLLIDES WITH THE ELEVATOR
checkAgainst: ig.Entity.TYPE.A,
check: function( other ){
elvCollision = true;
},
