Esempio n. 1
0
 public void updateitem(PlayerPlanModule Pdm, PlayerPlanModule.BUTTON_STATE btnstate, PlayerPlanModule.PlanEnum planstate)
 {
     mBtnState      = btnstate;
     mPlanState     = planstate;
     mBtnText.text  = getText(mBtnState);
     mJiangli.text  = Pdm.getjiangliText(int.Parse(mBtn.gameObject.name));
     mTiaojian.text = Pdm.gettiaojianText(int.Parse(mBtn.gameObject.name));
     ShowImageState(Pdm, mPlanState, int.Parse(mBtn.gameObject.name));
 }
Esempio n. 2
0
    private void ShowImageState(PlayerPlanModule Pdm, PlayerPlanModule.PlanEnum state, int index)
    {
        switch (state)
        {
        case PlayerPlanModule.PlanEnum.CHENGZHANG:
        {
            if (0 == index % 7)
            {
                index = 7;
            }
            else
            {
                index = index % 7;
            }

            UIAtlasHelper.SetSpriteImage(mDate, "wanjiajihua:wanjiajihua_11", true);
            UIAtlasHelper.SetSpriteImage(mShuZi, "shuzi:wanjiajihua_0" + index.ToString(), true);
            mShuZi.gameObject.SetActive(true);
            mZhuanshi.gameObject.SetActive(false);
            mZhuanshiText.text = "";
        } break;

        case PlayerPlanModule.PlanEnum.JINGYING:
        {
            mShuZi.gameObject.SetActive(false);
            mZhuanshi.gameObject.SetActive(true);
            mZhuanshiText.text = "x" + Pdm.getJewelNum(index).ToString();
            if (0 == index % 7)
            {
                index = 7;
            }
            else
            {
                index = index % 7;
            }

            UIAtlasHelper.SetSpriteImage(mDate, "qirilibao:qirilibao_0" + index.ToString(), true);
        } break;

        case PlayerPlanModule.PlanEnum.ZHIZHUN:
        {
            mShuZi.gameObject.SetActive(false);
            mZhuanshi.gameObject.SetActive(true);
            mZhuanshiText.text = "x" + Pdm.getJewelNum(index).ToString();
            if (0 == index % 7)
            {
                index = 7;
            }
            else
            {
                index = index % 7;
            }

            UIAtlasHelper.SetSpriteImage(mDate, "qirilibao:qirilibao_0" + index.ToString(), true);
        } break;

        default:
            GameDebug.LogError("PlayerPlanModule.PlanEnum state参数错误:" + state.ToString());
            break;
        }
    }