//-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Thursday, September 14, 2017 //-------------------------------------------------------- using UnityEngine; using UnityEngine.UI; namespace vnxbqy.UI { public class ExperienceHYXL : MonoBehaviour { [SerializeField] ScreenMoveTo m_MoveTo; [SerializeField] UIAlphaTween m_AlphaTween; [SerializeField] Text m_Experience; public void Begin(long _experience) { this.transform.SetActive(true); SetEnable(true); m_Experience.text = StringUtility.Contact("+$", _experience);; this.transform.localPosition = new Vector3(166,-85,0); m_MoveTo.Begin(OnFloatEnd); m_Experience.color = m_Experience.color.SetA(1f); m_AlphaTween.SetStartState(); m_AlphaTween.Play(); } public void SetEnable(bool _enable) { m_MoveTo.enabled = _enable; m_AlphaTween.enabled = _enable; } private void OnFloatEnd() { SetEnable(false); this.transform.SetActive(false); } } }