Animation speed scale8006006010falseGDevelop JS platformBuiltinCommonInstructions::CommentThe "Player" object has an automatism called "Platformer object":
You can move it using the arrows key and the Shift key to jump.
The platforms are recognized thanks to their "Platform" automatism.L'objet "Player" possède un automatisme appelé "Personnage déplaçable sur les plateformes":
Vous pouvez le bouger avec les flèches directionnelles et utiliser la touche Shift ( ou Maj ) pour sauter.
Les plateformes ont toutes un automatisme "Plateforme" afin d'être reconnues comme telles.BuiltinCommonInstructions::StandardPlayer=1BuiltinCommonInstructions::CommentChange the animation according to what the player do.On change l'animation en fonction de ce que fait le joueur.BuiltinCommonInstructions::StandardPlayerPlatformerObjectPlayer=1BuiltinCommonInstructions::StandardPlayerPlatformerObjectPlayer=1BuiltinCommonInstructions::StandardPlayerPlatformerObjectBuiltinCommonInstructions::StandardPlayerPlatformerObjectPlayer=0BuiltinCommonInstructions::StandardPlayerPlatformerObjectPlayer=2BuiltinCommonInstructions::StandardLeftPlayeryesBuiltinCommonInstructions::Standard"movementTime"BuiltinCommonInstructions::CommentWe use a timer to know the time elasped since the beginning of the movement. Then, we use this time to determine the speed of the player (and update the animation speed scale to accelerate the animation)On utilise un chronomètre pour connaître le temps écoulé depuis le début du mouvement du personnage. Ensuite, on utilise ce temps pour déterminer la vitesse du personnage (et mettre à jour l'échelle de vitesse de l'animation du personnage).BuiltinCommonInstructions::StandardPlayerPlatformerObject=800*(1-exp(-0.5*TimerElapsedTime("movementTime")))Player=(800*(1-exp(-0.5*TimerElapsedTime("movementTime"))))/400BuiltinCommonInstructions::StandardRightPlayernoBuiltinCommonInstructions::Standard"movementTime"BuiltinCommonInstructions::StandardPlayerPlatformerObject=800*(1-exp(-0.5*TimerElapsedTime("movementTime")))Player=(800*(1-exp(-0.5*TimerElapsedTime("movementTime"))))/400BuiltinCommonInstructions::CommentMake sure the camera follows the player.On s'assure que la caméra suit le joueur.BuiltinCommonInstructions::Standard=Player.X()AnimationScaleText=ToString(Player.AnimationSpeedScale())BuiltinCommonInstructions::CommentManagement of the moving platform:Gestion de la plateforme bougeante:BuiltinCommonInstructions::StandardGoLeftGoRight