Commit ce5eaadb authored by Hà Trung (NEGAXY)'s avatar Hà Trung (NEGAXY)

no message

parent f4ff6742
...@@ -3,6 +3,7 @@ using System.Collections.Generic; ...@@ -3,6 +3,7 @@ using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using TMPro; using TMPro;
using DG.Tweening;
public class SkillElement : MonoBehaviour public class SkillElement : MonoBehaviour
{ {
...@@ -24,6 +25,8 @@ public class SkillElement : MonoBehaviour ...@@ -24,6 +25,8 @@ public class SkillElement : MonoBehaviour
if (priceText) priceText.text = price.ToString(); if (priceText) priceText.text = price.ToString();
if (buyBtn) buyBtn.interactable = DataManager.Instance.userData.coin >= price; if (buyBtn) buyBtn.interactable = DataManager.Instance.userData.coin >= price;
if (selectBtn) selectBtn.interactable = DataManager.Instance.GetSkill(skillId) > 0; if (selectBtn) selectBtn.interactable = DataManager.Instance.GetSkill(skillId) > 0;
icon.transform.DOKill();
icon.transform.localScale = Vector3.one;
} }
public void SetTip(bool st) public void SetTip(bool st)
{ {
...@@ -36,6 +39,16 @@ public class SkillElement : MonoBehaviour ...@@ -36,6 +39,16 @@ public class SkillElement : MonoBehaviour
{ {
selectBtn.interactable = false; selectBtn.interactable = false;
} }
if (selectBtn.interactable)
{
icon.transform.localScale = Vector3.one;
icon.transform.DOScale(Vector3.one * 1.1f, 0.25f).SetLoops(-1, LoopType.Yoyo);
}
else
{
icon.transform.DOKill();
icon.transform.localScale = Vector3.one;
}
} }
public void OnClick_Buy() public void OnClick_Buy()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment