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.SpeedPenalty(0.25f, 1.0f, 1.0f); kart.Wiggle(1.0f); }