Beispiel #1
0
    public static bool CheckCanUp(BuildInfo Info)
    {
        CanQualityResult QuaReslut  = buildingM.GetQualityCanUP(Info);
        CanLevelResult   LevResult  = buildingM.GetLevelCanUP(Info);
        CanStarResult    StarResult = buildingM.GetCanUpStar(Info);

        if (LevResult == CanLevelResult.CanUp || QuaReslut == CanQualityResult.CanUp || StarResult == CanStarResult.CanUp)
        {
            return(true);
        }
        return(false);
    }
Beispiel #2
0
    private void SetUI()
    {
        //		AddDoubleLabelItem ("[552d0a]"+NGUIUtil.GetStringByKey(10000058)+"[-]"+m_Info.m_Solidity.ToString()
        //		                    ,"[552d0a]"+NGUIUtil.GetStringByKey(10000059)+"[-]"+m_Info.m_Intensity.ToString(),22);
        //
        //		AddDoubleLabelItem ("[552d0a]"+NGUIUtil.GetStringByKey(10000060)+"[-]"+m_Info.m_Tenacity.ToString()
        //		                    ,"[552d0a]"+NGUIUtil.GetStringByKey(10000057)+"[-]"+m_Info.m_hp.ToString(),22);
        //
        //		AddDoubleLabelItem ("[552d0a]"+NGUIUtil.GetStringByKey(10000053)+"[-]"+m_Info.m_phyattack.ToString()
        //		                    ,"[552d0a]"+NGUIUtil.GetStringByKey(10000055)+"[-]"+m_Info.m_phydefend.ToString(),22);
        //
        //		AddDoubleLabelItem ("[552d0a]"+NGUIUtil.GetStringByKey(10000071)+"[-]"+m_Info.m_magicattack.ToString()
        //		                    ,"[552d0a]"+NGUIUtil.GetStringByKey(10000056)+"[-]"+m_Info.m_magicdefend.ToString(),22);
        AddGrayItem();


        string StrLimit = "";

        int NextQuality = ConfigM.GetNextQuality(m_Info.Quality);
        int LimitLev    = buildingM.GetUpQualityLevelNeed(m_Info);

        CanQualityResult result = buildingM.GetQualityCanUP(m_Info);

        if (result == CanQualityResult.QualityMax)
        {
            MyHead.table.Reposition();
            return;
        }

        if (result != CanQualityResult.CanUp)
        {
            StrLimit = string.Format("[552d0a]" + NGUIUtil.GetStringByKey(10000072) + "[-]" + "[FF0000]" + NGUIUtil.GetStringByKey(10000091) + "[-]", LimitLev);
        }
        else
        {
            StrLimit = string.Format("[552d0a]" + NGUIUtil.GetStringByKey(10000072) + ":[-]");
        }

        m_CanUp = result == CanQualityResult.CanUp;
        AddLabelItem(StrLimit, 20);

        AddNeedMaTerial();
        AddShengJieBtn();

        MyHead.table.Reposition();

        DoCanShengJie();
    }
Beispiel #3
0
    private void BtnShengJie_OnClickEventHandler(UIButton sender)
    {
        if (m_parent.m_bIsShowQualityUp)
        {
            return;
        }

        CanQualityResult result = buildingM.GetQualityCanUP(m_Info);

        if (result == CanQualityResult.CanUp)
        {
            m_parent.BackUpInfo();
            BuildDC.Send_BuildQualityUpRequest(m_Info.ID);
            //			SetButtonEnable(false);
        }
    }
Beispiel #4
0
    private void DoCanShengJie()
    {
        if (m_BtnShengJie == null)
        {
            return;
        }
        CanQualityResult result = buildingM.GetQualityCanUP(m_Info);

        if (result == CanQualityResult.CanUp)
        {
            m_BtnShengJie.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);
            TweenScale ts = TweenScale.Begin(m_BtnShengJie.gameObject, 0.2f, new Vector3(1.2f, 1.2f, 1.2f));
            ts.style = UITweener.Style.PingPong;
        }
        else
        {
            TweenScale ts = m_BtnShengJie.gameObject.GetComponent <TweenScale>();
            if (ts != null)
            {
                Destroy(ts);
            }
        }
    }