54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using System;
|
|
using System.Linq;
|
|
|
|
public class GroundingGrid : CabinetUIBase
|
|
{
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public override void OnMenuChanged(Menu menu)
|
|
{
|
|
if (menu == Menu.M_数字孪生_接地网)
|
|
{
|
|
gameObject.SetActive(true);
|
|
|
|
var s = Array.FindAll(TransparentGlowManage.Inst.points.ToArray(), (item) =>
|
|
{
|
|
return (item.GetComponent<TransparentGlow>() != null &&
|
|
item.name != "R08" && item.name != "R15" && item.name != "R65" &&
|
|
item.name != "R57" && item.name != "R54" && item.name != "R45" &&
|
|
item.name != "R37" && item.name != "R29" && item.name != "R22");
|
|
}).Select(item => item.GetComponent<TransparentGlow>()).ToArray();
|
|
|
|
TransparentGlowManage.Inst.transparencyALL(s);
|
|
}
|
|
else if (menu == Menu.M_数字孪生_线缆连接_展示)
|
|
{
|
|
gameObject.SetActive(true);
|
|
}
|
|
else
|
|
{
|
|
gameObject.SetActive(false);
|
|
|
|
var s = Array.FindAll(TransparentGlowManage.Inst.points.ToArray(), (item) =>
|
|
{
|
|
return (item.GetComponent<TransparentGlow>() != null);
|
|
}).Select(item => item.GetComponent<TransparentGlow>()).ToArray();
|
|
|
|
TransparentGlowManage.Inst.renewALL(s);
|
|
}
|
|
}
|
|
}
|