Example #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player") && this.CompareTag("Resume") && animator != null)
     {
         animator.SetBool("Show", true);
         topDownCamera.SetCustomCameraSettings(animator.transform, 6f, 12f, 90f, .5f, 3f);
         StartCoroutine(SlowDownCar(other.gameObject));
     }
     else if (other.CompareTag("Player") && this.CompareTag("Projects") && animator != null)
     {
         animator.SetBool("Show", true);
         topDownCamera.SetCustomCameraSettings(animator.transform, 5f, 23f, 0f, .5f, 3f);
     }
     else if (other.CompareTag("Player") && this.CompareTag("Project") && animator != null)
     {
         int projectValue = int.Parse(gameObject.name.Substring(gameObject.name.Length - 1));
         animator.SetInteger("ProjectValue", projectValue);
         StartCoroutine(SlowDownCar(other.gameObject));
     }
 }