예제 #1
0
        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();
            }
        }
예제 #2
0
 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);
 }
예제 #3
0
 public virtual void ApplyStateData(SkinStateData data)
 {
     Debug.LogError("必须在子类重写这个函数!");
 }