修改提示bug

This commit is contained in:
lujiajian 2025-03-07 10:36:23 +08:00
parent 675375f3df
commit c54b58f5b2
3 changed files with 1211 additions and 560 deletions

File diff suppressed because it is too large Load Diff

View File

@ -47,7 +47,7 @@ public class StudyTips : MonoBehaviour
Up.gameObject.SetActive(true); Up.gameObject.SetActive(true);
contenttext.text = Tips[index]; contenttext.text = Tips[index];
} }
if (index >= Tips.Count) if (index >= Tips.Count-1)
{ {
Down.gameObject.SetActive(false); Down.gameObject.SetActive(false);
index = Tips.Count - 1; index = Tips.Count - 1;

View File

@ -12,6 +12,8 @@ public class SelectModel : MonoBehaviour
public Button connected_Devices;//设备互联与系统控制 public Button connected_Devices;//设备互联与系统控制
public Button maintenance;//智能家电与维护 public Button maintenance;//智能家电与维护
public Region region = Region.None; public Region region = Region.None;
public Transform Player;
public List<Transform> Pos = new List<Transform>();
private void Awake() private void Awake()
{ {
Instance = this; Instance = this;
@ -22,16 +24,19 @@ public class SelectModel : MonoBehaviour
{ {
region = Region.; region = Region.;
gameObject.SetActive(false); gameObject.SetActive(false);
Player.SetLocalPositionAndRotation(Pos[0].position, Pos[0].rotation);
}); });
connected_Devices.onClick.AddListener(() => connected_Devices.onClick.AddListener(() =>
{ {
region = Region.; region = Region.;
gameObject.SetActive(false); gameObject.SetActive(false);
Player.SetLocalPositionAndRotation(Pos[1].position, Pos[1].rotation);
}); });
maintenance.onClick.AddListener(() => maintenance.onClick.AddListener(() =>
{ {
region = Region.; region = Region.;
gameObject.SetActive(false); gameObject.SetActive(false);
Player.SetLocalPositionAndRotation(Pos[2].position, Pos[2].rotation);
}); });
} }
void Update() void Update()