📜  C# sprint 键 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:59.452000             🧑  作者: Mango

代码示例1
if (Input.GetKey("left shift")){ // If Player Presses Shift Key
    Sprint = 2f; // Sprint Double Speed
} else {
    Sprint = 1f; // Disable Sprint
}

// Move Player
controller.Move(move * speed * Sprint * Time.deltaTime); 
// Move is your Player Move Variable