DebugForLerp.cs 672 B

123456789101112131415161718192021
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class DebugForLerp : MonoBehaviour
  6. {
  7. // Start is called before the first frame update
  8. void OnEnable()
  9. {
  10. this.transform.GetComponentInChildren<Text>().text =
  11. AimHandler.ins.lerpForRotation ? "关闭镜头旋转插值" : "开启镜头旋转插值";
  12. }
  13. public void Click()
  14. {
  15. AimHandler.ins.lerpForRotation = !AimHandler.ins.lerpForRotation;
  16. this.transform.GetComponentInChildren<Text>().text =
  17. AimHandler.ins.lerpForRotation ? "关闭镜头旋转插值" : "开启镜头旋转插值";
  18. }
  19. }