| | |
| | | [SerializeField] ScaleTween m_ScaleTween; |
| | | [SerializeField] UIAlphaTween m_UIAlphaTween; |
| | | [SerializeField] Text m_TextLV; |
| | | [SerializeField] UIEffect m_UIEffect; |
| | | [SerializeField] UIEffect m_UIEffect;
|
| | |
|
| | | [SerializeField] UIAlphaTween m_UIAlphaTween2; |
| | | [SerializeField] Text m_TextLV2; |
| | | [SerializeField] Image m_upgrade1; |
| | | [SerializeField] Image m_upgradeMore; |
| | | [SerializeField] Image m_upgradeMore2; |
| | | |
| | | public float Delay = 0.5f; |
| | | uint m_changeLV = 0; |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | PlayerDatas.Instance.playerLVUpdateEvent += LVChange; |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | } |
| | | |
| | | void LVChange(uint changeLV)
|
| | | {
|
| | | m_changeLV = changeLV;
|
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | m_UIAlphaTween.SetStartState();
|
| | | m_UIAlphaTween2.SetStartState();
|
| | | m_TextLV.text = PlayerDatas.Instance.baseData.LV.ToString();
|
| | |
|
| | | m_TextLV2.gameObject.SetActive(false);
|
| | | m_upgrade1.gameObject.SetActive(false);
|
| | | m_upgradeMore.gameObject.SetActive(false);
|
| | | m_upgradeMore2.gameObject.SetActive(false);
|
| | |
|
| | | if (m_changeLV > 1)
|
| | | {
|
| | | m_TextLV2.text = m_changeLV.ToString();
|
| | | m_upgradeMore.gameObject.SetActive(true);
|
| | | m_upgradeMore2.gameObject.SetActive(true);
|
| | | m_TextLV2.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_upgrade1.gameObject.SetActive(true);
|
| | | }
|
| | | } |
| | | protected override void OnActived()
|
| | | {
|
| | |
| | | |
| | | protected override void OnPreClose() |
| | | {
|
| | | m_changeLV = 0;
|
| | | if (m_UIEffect.IsPlaying)
|
| | | {
|
| | | m_UIEffect.Stop();
|
| | |
| | | {
|
| | | yield return new WaitForSeconds(Delay);
|
| | | m_UIAlphaTween.Play();
|
| | | m_UIAlphaTween2.Play();
|
| | | }
|
| | | #endregion
|
| | | private void windowBeforeClose(Window _window)
|