public void Renewal_Button_Upgrade()
    {
        if (MainController.Instance != null)
        {
            if (MainController.Instance.UserInfo.GetUserAbilityLevel(m_Kind) ==
                MainController.Instance.GetAllHeroAbilityLevel(m_Kind).Count)
            {
                Img_GoldIcon.gameObject.SetActive(false);
                Txt_NextPrice.text  = "MAX!";
                Txt_NextPrice.color = new Color(1f, 0.556f, 0.27f);
                Btn_Gold.DisableButton();

                return;
            }

            if (MainController.Instance.UserInfo.GetUserGold() <
                MainController.Instance.GetHeroAbilityLevel(m_Kind,
                                                            MainController.Instance.UserInfo.GetUserAbilityLevel(m_Kind)).NextPrice)
            {
                Txt_NextPrice.color = new Color(0.823f, 0.333f, 0.313f);
                Btn_Gold.DisableButton();
            }

            if (MainController.Instance.UserInfo.GetUserGold() >=
                MainController.Instance.GetHeroAbilityLevel(m_Kind,
                                                            MainController.Instance.UserInfo.GetUserAbilityLevel(m_Kind)).NextPrice)
            {
                Txt_NextPrice.color = Color.white;
                Btn_Gold.UseableButton();
            }

            // 건물 레벨에 따른 능력치 레벨 제한
            LimitAbilityOfBuildingLevel();
        }
    }
 private void RenewalUI_StageButton()
 {
     if (MainController.Instance.UserInfo.GetUserIsStageOpen(m_StageKind) == true &&
         MainController.Instance.UserInfo.GetUserStageBossShow(m_StageKind) == true)
     {
         Btn_Stage.FineButNotUsedButton();
     }
     else if (MainController.Instance.UserInfo.GetUserIsStageOpen(m_StageKind) == true &&
              MainController.Instance.UserInfo.GetUserStageBossShow(m_StageKind) == false)
     {
         Btn_Stage.UseableButton();
     }
     else if (MainController.Instance.UserInfo.GetUserIsStageOpen(m_StageKind) == false &&
              MainController.Instance.UserInfo.GetUserStageBossShow(m_StageKind) == false)
     {
         Btn_Stage.DisableButton();
     }
 }
Beispiel #3
0
    private void Start()
    {
        if (MainController.Instance != null)
        {
            // 스킬 언락 여부에 따른 아이콘 노출
            if (MainController.Instance.UserInfo.GetUserIsUnlockSkill(m_Kind) == true)
            {
                Obj_Button.UseableButton();
            }
            else
            {
                Obj_Button.DisableButton();
            }
        }

        // 첫 쿨은 1초
        StartCoroutine(FirstSkillCoolTime());
    }