您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

35 行
936 B

using UnityEditor.AnimatedValues;
using UnityEngine.Events;
namespace UnityEditor.Experimental.Rendering
{
public class BaseUI<TType>
{
protected AnimBool[] m_AnimBools = null;
protected TType data { get; private set; }
public BaseUI(int animBoolCount)
{
m_AnimBools = new AnimBool[animBoolCount];
for (var i = 0; i < m_AnimBools.Length; ++i)
m_AnimBools[i] = new AnimBool();
}
public virtual void Reset(TType data, UnityAction repaint)
{
this.data = data;
for (var i = 0; i < m_AnimBools.Length; ++i)
{
m_AnimBools[i].valueChanged.RemoveAllListeners();
if (repaint != null)
m_AnimBools[i].valueChanged.AddListener(repaint);
}
Update();
}
public virtual void Update()
{
}
}
}