using TMPro; using UnityEngine; using WS; public class PointView : View { public GameObject BasePoint; public GameObject OPPoint; public GameObject MousePoint; public TextMeshProUGUI Text; public override void LoadInit() { ShowModeType = ViewShowModeType.Screen; ReferenceCollector rc = UIGameObject.GetComponent(); BasePoint = rc.Get("BasePoint"); OPPoint = rc.Get("OPPoint"); MousePoint = rc.Get("MousePoint"); Text = rc.GetComponent("Text"); } private void SetText(string text) { Text.text = text; } public void ShowPoint(int index = 0, string text = null) { SetText(text); BasePoint.gameObject.SetActive(index == 0); OPPoint.gameObject.SetActive(index == 1); MousePoint.gameObject.SetActive(index == 2); } }