From 74a4f421b436b5950e52660ba7d6ebc53a818fa5 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sat, 31 Jan 2026 20:14:48 +0800 Subject: 完成好多 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/GameControllerInput.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Assets/Scripts/GameControllerInput.cs') 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(); + bool isBoost = value > 0.5f; + _playerControl.boosting = isBoost; + } } -- cgit