VariTester.cs 996 B

123456789101112131415161718192021222324252627282930313233
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class VariTester : MonoBehaviour
  6. {
  7. static VariTester ins;
  8. [SerializeField] Text text;
  9. [SerializeField] InputField inputField;
  10. [SerializeField] Text textAny;
  11. void Awake()
  12. {
  13. if (ins) Destroy(gameObject);
  14. else {
  15. ins = this;
  16. DontDestroyOnLoad(this);
  17. text.text = "当前参数值为:" + o0.Bow.o09AxisAfterXiaMenFromDll.vari.ToString();
  18. inputField.onEndEdit.AddListener((s) => {
  19. double num = double.Parse(s);
  20. if (double.IsNaN(num) || double.IsInfinity(num)) return;
  21. o0.Bow.o09AxisAfterXiaMenFromDll.vari = num;
  22. text.text = "当前参数值为:" + o0.Bow.o09AxisAfterXiaMenFromDll.vari.ToString();
  23. });
  24. }
  25. }
  26. void LateUpdate() {
  27. textAny.text = o0.Bow.o09AxisAfterXiaMenFromDll.debugInfo;
  28. }
  29. }