//-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, April 09, 2018 //-------------------------------------------------------- using UnityEngine; using System.Collections; using UnityEngine.UI; namespace vnxbqy.UI { public class TreasureAchievementUnfoldShow : MonoBehaviour { [SerializeField] UIAlphaTween m_AlphaTween; [SerializeField] UISmoothMove m_SmoothMove; RectTransform rectTransform { get { return this.transform as RectTransform; } } public void Begin() { m_AlphaTween.SetStartState(); m_AlphaTween.Play(); rectTransform.anchoredPosition = rectTransform.anchoredPosition.SetY(rectTransform.rect.height * 2f); m_SmoothMove.to = Vector2.zero; m_SmoothMove.Begin(); } public void Stop() { m_AlphaTween.SetEndState(); m_SmoothMove.Stop(); rectTransform.anchoredPosition = Vector2.zero; } } }