diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-01-31 20:14:48 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-01-31 20:14:48 +0800 |
| commit | 74a4f421b436b5950e52660ba7d6ebc53a818fa5 (patch) | |
| tree | 9841fb6655fee855ba581768872de2deacf57f38 /Assets/Scripts/GameControllerInput.cs | |
| parent | 38e3e1fa64334f9cfd2f35e21439b93f525bf1b4 (diff) | |
Diffstat (limited to 'Assets/Scripts/GameControllerInput.cs')
| -rw-r--r-- | Assets/Scripts/GameControllerInput.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Assets/Scripts/GameControllerInput.cs b/Assets/Scripts/GameControllerInput.cs index ff29c12..7472463 100644 --- a/Assets/Scripts/GameControllerInput.cs +++ b/Assets/Scripts/GameControllerInput.cs @@ -24,4 +24,11 @@ public class GameControllerInput : MonoBehaviour bool isGrabbing = value > 0.5f; _playerControl.grabbing = isGrabbing; } + + public void OnBoost(InputAction.CallbackContext context) + { + float value = context.ReadValue<float>(); + bool isBoost = value > 0.5f; + _playerControl.boosting = isBoost; + } } |
