I am making a phaser 3 game, and want to make it so that the player's jump and double jump are recharged upon them touching a platform, and I want to be able to do this dynamically by checking if the player is currently being affected by gravity in the update function and recharge their jumps if they are grounded, either on the bottom of the scene or a platform.