//using HybridCLR; using DTYJ; using System.Collections; using System.Collections.Generic; using System.IO; using TMPro; using UnityCommon; using UnityEngine; using UnityEngine.UI; //using UnityEngine.AddressableAssets; public class Test : MonoBehaviour { public GameObject[] gos; public void Start() { Utility.DelayExe(5, () => { for (int i = 0; i < gos.Length; i++) { gos[i].SetActive(true); } }); } //private void OnTriggerEnter(Collider other) //{ // Debug.LogWarning(other.name); //} //public float stepL; //public int count = 30; //[ContextMenu("处理")] //public void Handle1() //{ // GameObject goOrig = transform.GetChild(0).gameObject; // for (int i = 0; i < count; i++) // { // var goNew = Instantiate(goOrig, goOrig.transform.parent); // goNew.name = "进出列车-下行_" + (i + 1); // goNew.transform.localPosition = new Vector3(0, 0, stepL * i); // } //} public string mac; [ContextMenu("处理")] public void Handle() { SetANim(); return; //var regMd5 = Utility.GetMD5WithString(mac + "swsj202312"); //Debug.Log(regMd5); int ncount = transform.childCount; for (int i = 0; i < ncount; i++) { Transform t = transform.GetChild(i); t.GetChild(0).gameObject.SetActive(false); t.GetChild(1).gameObject.SetActive(false); t.GetChild(2).gameObject.SetActive(false); } } public float sthVal = 4.42f; public GameObject goOrg; public void SetSth() { var tfOrg = goOrg.transform; for (int i = 138092; i <= 138120; ++i) { var tfNew = Instantiate(tfOrg, tfOrg.parent); tfNew.name = i.ToString(); tfNew.transform.position = new Vector3(tfOrg.position.x, tfOrg.position.y, tfOrg.position.z + (sthVal * (i - 138092))); } } public void SetANim() { int count = transform.childCount; for (int i = 0; i < count; i++) { var t = transform.GetChild(i); var lcw = t.GetComponent(); string strAnim = "EquipController/LCW/" + t.name; lcw.dic = new Dictionary() { { "自动", strAnim }, { "手动开", strAnim }, { "手动关", strAnim }, { "隔离", strAnim } }; } } }