How to create Button/Switch-Like Tile where you can step on it and change its value?
- by aldroid16
If the player step on Button-Tile when its true, it become false. If the player step on Button-Tile when its false, it become true.
The problem is, when the player stand on (intersect) the Button-Tile, it will keep updating the condition. So, from true, it become false. Because its false and player intersect on it, it become true again. True-false-true-false and so on.
I use ElapsedGameTime to make the updating process slower, and player can have a chance to change the Button to true or false.
However, its not a solution I was looking for. Is there any other way to make it keep in False/True condition while the Player standing on it (The Button tile) ?