JumpCamera.cs 359 B

12345678910111213141516171819
  1. using System;
  2. using UnityEngine;
  3. [RequireComponent(typeof(BoxCollider2D))]
  4. public class JumpCamera : BaseBehaviour
  5. {
  6. private void OnTriggerEnter2D(Collider2D other)
  7. {
  8. if (other.CompareTag("Player"))
  9. {
  10. R.Camera.Controller.IsFollowPivot = false;
  11. }
  12. }
  13. private void OnDestroy()
  14. {
  15. R.Camera.Controller.IsFollowPivot = true;
  16. }
  17. }