Files
2025-01-25 04:38:09 +08:00

47 lines
1.3 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Thousandto.Launcher.ExternalLibs
{
/// <summary>
/// 遮挡剔除节点
/// </summary>
public class OcNode
{
//OC类型
public OcDefine type = OcDefine.OC_Default;
public OcRender rdType = OcRender.OC_Default;
public Transform trans = null;
public Renderer rd = null;
public Vector3 Min = Vector3.zero;
public Vector3 Max = Vector3.zero;
//key: NodeType value:所在格子的索引id
public Dictionary<int, List<int>> dicRefrenceCellIds = new Dictionary<int, List<int>>();
public int realKey = -1;
public List<int> GetRefrenceIds(OcDefine type)
{
if (dicRefrenceCellIds.ContainsKey((int)type))
{
return dicRefrenceCellIds[(int)type];
}
return null;
}
public void SetRealRefrenceCellIds()
{
List<int> list = null;
if (dicRefrenceCellIds.ContainsKey(realKey))
{
list = dicRefrenceCellIds[realKey];
}
dicRefrenceCellIds.Clear();
if (list != null)
{
dicRefrenceCellIds.Add(realKey, list);
}
}
}
}