少年修仙传客户端代码仓库
lcy
2024-12-16 a39c35fc6449430cd02bccb681c4a0a880e46cd9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//--------------------------------------------------------
//    [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);
        }
 
    }
 
}