private void UpdateTimers() { if (inputScript.GetButton("PlayerInteract")) { grabTimer += Time.deltaTime; } else { grabTimer = 0f; } }
private void TakeInput() { rotationInput = new Vector3(inputScript.GetAxis("ShipPitch") * pitchMultiplier, inputScript.GetAxis("ShipYaw") * yawMultiplier, inputScript.GetAxis("ShipRoll") * rollMultiplier); takeOff = inputScript.GetButton("ShipTakeOff"); landShip = inputScript.GetButton("ShipLand"); exitShip = inputScript.GetButton("ShipExit"); if (spaceship.ShipState == SpaceShipState.FLYING) { if (inputScript.GetButton("ShipThrottleUp")) { throttle += 0.7f * Time.deltaTime; } if (inputScript.GetButton("ShipThrottleDown")) { throttle -= 0.7f * Time.deltaTime; } throttle = Mathf.Clamp01(throttle); } }