This commit is contained in:
YangHua 2023-09-17 23:20:05 +08:00
commit 6693f3095a
4 changed files with 1933 additions and 278 deletions

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7dae44daca32e4f428c877951384f724
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -7,14 +7,14 @@ using static UnityEditor.Progress;
public class NameplateController : MonoSingleton<NameplateController>
{
public GameObject NameplatePanel;
public RectTransform backTransform;
public RectTransform mtTransform;
public Image NameplateImage;
public List<TextMeshProUGUI> NameplateTextUGUI;
public GameObject[] Obj_Nameplate;
public List<TextMeshProUGUI> NameplateTextUGUI;
public List<TextMeshPro> TextUGUI_NBQ;
public List<TextMeshPro> TextUGUI_HGQ;
public Dictionary<string, TextMeshProUGUI> DictextMeshPro;
private void Start()
@ -26,6 +26,9 @@ public class NameplateController : MonoSingleton<NameplateController>
{
DictextMeshPro = new Dictionary<string, TextMeshProUGUI>();
TextUGUI_NBQ = new List<TextMeshPro>();
TextUGUI_HGQ = new List<TextMeshPro>();
DictextMeshPro.Add("低压互感器铭牌", NameplateTextUGUI[0]);
DictextMeshPro.Add("2号逆变器_铭牌_正确", NameplateTextUGUI[1]);
DictextMeshPro.Add("光伏板_铭牌", NameplateTextUGUI[2]);
@ -34,6 +37,14 @@ public class NameplateController : MonoSingleton<NameplateController>
foreach (GameObject item in Obj_Nameplate)
{
item.AddComponent<ShowNameplate>();
if (item.name != "光伏板_铭牌")
{
TextMeshPro itemMesh = item.transform.GetChild(0).GetComponent<TextMeshPro>();
if (item.name == "低压互感器铭牌")
TextUGUI_HGQ.Add(itemMesh);
else
TextUGUI_NBQ.Add(itemMesh);
}
}
}

File diff suppressed because one or more lines are too long