| | |
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | |
| | | private float m_TopLimit;
|
| | |
|
| | | bool inited = false;
|
| | |
|
| | | [SerializeField] RectTransform m_ContainerSpecialBuff;
|
| | | [SerializeField] PositionTween m_SpeicalBuffTween;
|
| | | [SerializeField] UIAlphaTween m_SpecialBuffAlplaTween;
|
| | | [SerializeField] int m_SpecialBuffId;
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | | m_FreeList.Push(m_TipList[i]);
|
| | | }
|
| | | m_TipList.Clear();
|
| | | m_ContainerSpecialBuff.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | protected override void LateUpdate()
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | private void OnGainStatus(string buffName)
|
| | | private void OnGainStatus(int skillId)
|
| | | {
|
| | | var skillConfig = Config.Instance.Get<SkillConfig>(skillId);
|
| | | if (skillConfig != null)
|
| | | {
|
| | | if (skillConfig.SkillTypeID == m_SpecialBuffId)
|
| | | {
|
| | | DisplaySpecialTip();
|
| | | }
|
| | | else
|
| | | {
|
| | | DisplayLabelTip(skillConfig.SkillName);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayLabelTip(string buffName)
|
| | | {
|
| | | TipController _newController = null;
|
| | | if (m_FreeList.Count > 0)
|
| | |
| | | m_MoveTime += moveDuration;
|
| | | }
|
| | |
|
| | | void DisplaySpecialTip()
|
| | | {
|
| | | transform.SetAsLastSibling();
|
| | | m_SpeicalBuffTween.SetStartState();
|
| | | m_SpecialBuffAlplaTween.SetStartState();
|
| | | m_SpeicalBuffTween.enabled = false;
|
| | | m_SpecialBuffAlplaTween.enabled = false;
|
| | | m_ContainerSpecialBuff.gameObject.SetActive(true);
|
| | | m_SpeicalBuffTween.enabled = true;
|
| | | m_SpeicalBuffTween.Play(OnSpecialBuffComplete);
|
| | | }
|
| | |
|
| | | private void OnSpecialBuffComplete()
|
| | | {
|
| | | m_SpecialBuffAlplaTween.enabled = true;
|
| | | m_SpecialBuffAlplaTween.Play(OnSpecialBuffAlphaComplete);
|
| | | }
|
| | |
|
| | | private void OnSpecialBuffAlphaComplete()
|
| | | {
|
| | | m_ContainerSpecialBuff.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | |
|