using System; using System.Collections; using System.Collections.Generic; using Newtonsoft.Json; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; using UnityEngine.UIElements; using ZXing; using ZXing.QrCode; //using UnityEngine.UI; using Button = UnityEngine.UIElements.Button; //using Image = UnityEngine.UIElements.Image; /* 这个controller 是用于控制 Status UI菜单的 * 包含显示狗的最新状态 * 添加狗,把狗送给朋友,删除狗 */ public class StatusController : MonoBehaviour { private Button backButton, cancelButton; private Label nameLabel, genderLabel, breedLabel, hostLabel, hostnameLabel, ageLabel, ageValueLabel, commandLabel, commandValueLabel, statusLabel, statusValueLabel, resetVoice; private Label leftArrow, rightArrow; private Label addLabel, transfer, remove, callback; private float transferCountStartTime; DogProperty puppy; private VisualElement selectElement, statusElement, transferElement, QRcode; private StausUIPage currentPage = StausUIPage.Status; // 转移狗使用的变量 private Label transferMsgLabel; private string transferMsgOrigin; private string transferCode; // Start is called before the first frame update void OnEnable() { var root = GetComponent().rootVisualElement; // 状态相关的控件 statusElement = root.Q("statusUI"); backButton = root.Q