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