public virtual void Init() { currentSkinId = InvalidSkinID; if (null == m_currStateData) { m_currStateData = new SkinStateData(); } m_currStateData.Active = true; m_currStateData.Alpha = 1.0f; m_currStateData.Scale = Vector3.one; m_currStateData.Vislble = true; if (null == onSkinCull) { onSkinCull = new UnityEvent(); } if (null == onSkinNotCull) { onSkinNotCull = new UnityEvent(); } if (null == onSkinChanged) { onSkinChanged = new SkinChangedEvent(); } }
public override void ApplyStateData(SkinStateData data) { if (data.Active) { SkinManager.EnableSkinInstance(CurrentSkinInstance); } else { SkinManager.DisableSkinInstance(CurrentSkinInstance); } SetScale(data.Scale); SetVisible(data.Vislble, true); setAlpha(data.Alpha); }
public virtual void ApplyStateData(SkinStateData data) { Debug.LogError("必须在子类重写这个函数!"); }