DebugArrowOffsetAngle2.cs 523 B

12345678910111213141516171819202122232425
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class DebugArrowOffsetAngle2 : MonoBehaviour
  6. {
  7. [SerializeField] Text offsetAngleText;
  8. public static DebugArrowOffsetAngle2 ins;
  9. void Start()
  10. {
  11. ins = this;
  12. }
  13. void OnDestroy()
  14. {
  15. if (ins == this) ins = null;
  16. }
  17. public void SetOffsetAngles(float x, float y)
  18. {
  19. offsetAngleText.text = "x:" + x.ToString("#0.000") + "\ny:" + y.ToString("#0.000");
  20. }
  21. }