// Check if the player is sprinting void CheckSprint() { // If any key is pressed if (Input.anyKey) { // Sprint player.Sprint(); } else { // Walk player.Walk(); } }