using System.Collections.Generic;
using UnityEngine;
namespace Thousandto.Launcher.ExternalLibs
{
///
/// 场景节点组件
///
public class SceneNodeCommpent
{
private List _saveSubTexIndexs = new List();
private Bounds _bounds;
public Transform Trans = null;
public Vector3 Min = Vector3.zero;
public Vector3 Max = Vector3.zero;
public NodeRootType RootType = NodeRootType.Default;
public RendererType RenderType = RendererType.None;
public Dictionary> RefrenceDic = new Dictionary>();
public bool IsActive = false;
public bool IsUseDefaultShader = false;
//是否保存了Texture
public bool IsSaveTexture = false;
//是否设置了mesh合并数据
public bool IsSetCombinData = false;
//合并后的subMeshIndex
public int SubMeshIndex = -1;
//材质属性索引
public List MatProList = new List();
public List GetRefrenceIds(CellType type)
{
if (RefrenceDic.ContainsKey((int)type))
{
return RefrenceDic[(int)type];
}
return null;
}
public bool IsDirty = false;
public void SetBounds(Bounds bs)
{
_bounds = bs;
}
public Bounds GetBounds()
{
return _bounds;
}
public bool IsSaveSuMatTex(int index)
{
return _saveSubTexIndexs.Contains(index);
}
public void SetSaveSubMatTexIndex(int index)
{
if(!_saveSubTexIndexs.Contains(index))
_saveSubTexIndexs.Add(index);
}
}
public enum NodeRootType
{
Default = 0,
FarRoot = 1, //远处可视节点
NearRoot, //进出可视节点
MidleRoot, //midel节点
ParticFar, //特效远
ParticMidle, //特效中
ParticNear, //特效进节点
ParticNearHide, //特效near节点隐藏
Other, //其他节点
}
}