void Update() { // read the input from the controller, and send it straight to the kart controller kart.Thrust = Input.GetAxis("Vertical"); kart.Steering = Input.GetAxis("Horizontal"); // debug controls for triggering various things if (Input.GetKeyDown(KeyCode.S)) { kart.Spin(2.0f); } if (Input.GetKeyDown(KeyCode.W)) { kart.Wiggle(2.0f); } if (Input.GetKeyDown(KeyCode.J)) { kart.Jump(1.0f); } if (Input.GetKeyDown(KeyCode.B)) { kart.SpeedBoost(); } if (Input.GetKeyDown(KeyCode.P)) { kart.SpeedPenalty(); } }
protected override void OnPickupCollected(KartController kart) { kart.Jump(1.0f); }