示例#1
0
 void OnTriggerEnter(Collider coll)
 {
     if (coll.CompareTag("Player"))
     {
         coll.material = coll.GetComponent <TransformController>().currentTransform.transformPhysicMaterial;
         BallController ball = coll.GetComponent <BallController>();
         ball.GetComponent <TransformController>().currentTransform.EnablePhysicalModifiers(ball);
         ball.ResetMovementModifiersToDefaults();
         ball.GetComponent <LightsController>().TurnLightOff();
         ball.allowBrakeLocks = true;
         cameraRig.removeAngleConstraint();
         cameraRig.resetNeutralTilt();
     }
 }
示例#2
0
 void OnTriggerExit(Collider coll)
 {
     if (resetOnExit && coll.CompareTag("Player"))
     {
         if (camLock || hardReset)
         {
             cameraRig.removeAngleConstraint();
         }
         if (camTilt || hardReset)
         {
             cameraRig.resetNeutralTilt(resetTiltTime);
         }
         if (camZoom || hardReset)
         {
             cameraRig.zoomCamera(-camZoomAmount, resetZoomTime);
         }
     }
 }