From 32a2fc789ef3f2ee5d3d1355e8affac06355e3c3 Mon Sep 17 00:00:00 2001 From: OddlyTimbot Date: Mon, 29 Sep 2025 16:31:36 -0400 Subject: [PATCH] character update instructions week 3 --- week3/character_update.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/week3/character_update.md b/week3/character_update.md index a131431..09dc452 100644 --- a/week3/character_update.md +++ b/week3/character_update.md @@ -106,12 +106,13 @@ Note the addition of the state change to `State.JUMP`. That is the main thing we if current_state == State.JUMP: #apply normal velocity velocity += get_gravity() * delta - else: - #apply hard gravity, character falling - velocity += get_gravity() * hard_gravity * delta + if velocity.y>0: + current_state = State.FALLING +else: + #apply hard gravity, character falling + velocity += get_gravity() * hard_gravity * delta + - if velocity.y>0: - current_state = State.FALLING ``` Now if the player is in the "JUMP" state they get normal gravity, otherwise they get the hard gravity.