'game and watch' character style movement

Hey everyone,

I’m new to Unity and trying to make a game and watch style game in C#. I’ve set up the character movement by creating a plane with different materials that switch depending on which movement key is pressed when the character is in a particular position.

However depending on the order of my functions inside the PlayerMovement() function, the character sometimes moves more that one space with a single key press. With the current order in the code below, it goes from Climb to MiddleTop to Jump, all in a single button press, effectively skipping MiddleTop.

How can do I make only one PlayerMovement function run per key press?

void Update (){
		PlayerMovement ();
	}

	void PlayerMovement (){
		
		PlayerMovementClimb();
		PlayerMovementMiddleLow();		
		PlayerMovementMiddleTop();
	
		PlayerMovementRightLow();
		PlayerMovementRightTop();
		
		PlayerMovementLeftLow();
		PlayerMovementLeftTop();
	}
	
	void PlayerMovementClimb (){
		if (currentPlayerPos == "Climb" && Input.GetKeyDown(KeyCode.UpArrow)){
			PlayerGotoMiddleTop ();
		}
		if (currentPlayerPos == "Climb" && Input.GetKeyDown(KeyCode.DownArrow)){
			PlayerGotoMiddleLow ();
		}
	}
	void PlayerMovementLeftLow (){
		if (currentPlayerPos == "LeftLow" && Input.GetKeyDown(KeyCode.RightArrow)){
			PlayerGotoMiddleLow ();
		}
	}
	void PlayerMovementLeftTop (){
		if (currentPlayerPos == "LeftTop" && Input.GetKeyDown(KeyCode.RightArrow)){
			PlayerGotoMiddleTop ();
		}
	}
	void PlayerMovementMiddleLow (){
		if (currentPlayerPos == "MiddleLow" && Input.GetKeyDown(KeyCode.UpArrow)){
			PlayerGotoClimb ();
		}
		if (currentPlayerPos == "MiddleLow" && Input.GetKeyDown(KeyCode.LeftArrow)){
			PlayerGotoLeftLow ();
		}
		if (currentPlayerPos == "MiddleLow" && Input.GetKeyDown(KeyCode.RightArrow)){
			PlayerGotoRightLow ();
		}
	}
	void PlayerMovementMiddleTop (){
		if (currentPlayerPos == "MiddleTop" && Input.GetKeyDown(KeyCode.UpArrow)){
			PlayerGotoJump ();
		}
		if (currentPlayerPos == "MiddleTop" && Input.GetKeyDown(KeyCode.DownArrow)){
			PlayerGotoClimb ();
		}
		if (currentPlayerPos == "MiddleTop" && Input.GetKeyDown(KeyCode.LeftArrow)){
			PlayerGotoLeftTop ();
		}
		if (currentPlayerPos == "MiddleTop" && Input.GetKeyDown(KeyCode.RightArrow)){
			PlayerGotoRightTop ();
		}
	}
	void PlayerMovementRightLow (){
		if (currentPlayerPos == "RightLow" && Input.GetKeyDown(KeyCode.LeftArrow)){
			PlayerGotoMiddleLow ();
		}
	}
	void PlayerMovementRightTop (){
		if (currentPlayerPos == "RightTop" && Input.GetKeyDown(KeyCode.LeftArrow)){
			PlayerGotoMiddleTop ();
		}
	}
	
	void PlayerGotoClimb (){
		renderer.material = Player_Climb;
		currentPlayerPos = "Climb";
	}
	void PlayerGotoJump (){
		renderer.material = Player_Jump;
		currentPlayerPos = "Jump";
		Invoke("PlayerGotoMiddleTop", playerJumpTime);
	}
	void PlayerGotoLeftLow (){
		renderer.material = Player_LeftLow;
		currentPlayerPos = "LeftLow";
	}
	void PlayerGotoLeftTop (){
		renderer.material = Player_LeftTop;
		currentPlayerPos = "LeftTop";
	}
	void PlayerGotoMiddleLow (){
		renderer.material = Player_MiddleLow;
		currentPlayerPos = "MiddleLow";
	}
	void PlayerGotoMiddleTop (){
		renderer.material = Player_MiddleTop;
		currentPlayerPos = "MiddleTop";
	}
	void PlayerGotoRightLow (){
		renderer.material = Player_RightLow;
		currentPlayerPos = "RightLow";
	}
	void PlayerGotoRightTop (){
		renderer.material = Player_RightTop;
		currentPlayerPos = "RightTop";
	}	
}

PlayerMovementClimb calls PlayerGotoMiddleTop which sets currentPlayerPos = “MiddleTop”; so when the function PlayerMovementMiddleTop is called, it sees the same input (UpArrow) and currentPlayerPos as “MiddleTop”, hence going straight to the PlayerGotoJump.

Am thinking this could be avoided by using a switch based on currentPlayerPos. Start with the current pos, then call functions based on the available actions there. currentPlayerPos gets updated at the end, and then in the next frame the switch will fall to the correct options.

Either that or find a way to interrupt any if executing if one if has already been calculated this frame. I really suggest the switch-case method (which seems like a re-write but really is not that much to modify).