Exemple #1
0
 private void setPartType(int type)
 {
     m_textPanel_obj.SetActive(type == 2);
     m_imgPanel_obj.SetActive(type == 1);
     m_chooseRoot_obj.SetActive(1 == type || 2 == type);
     m_textRoot_obj.SetActive(0 == type);
 }
Exemple #2
0
    protected void CreatBattelField()
    {
        isStartBattel = true;
        Debug.Log($"Битва началась! -> {GetType().Name}");

        returnButton.SetActive(false);
        buttonFinishBattel.gameObject.SetActive(true);
        buttonNextTurn.gameObject.SetActive(true);

        battelFieldFactory.GetBattelDataPanel(Battel);
        battelFieldFactory.GetPersonsPanel(transform, Battel.Player, Battel.Enemy);
        battelFieldFactory.GetStartingHandPanel(transform, timerNextTurn, Battel.Player, NextTurn);

        var battleFieldCards = battelFieldFactory.GetBattleFieldCards();

        Battel.Enemy.AssingCells(battleFieldCards.CellEnemy);
        Battel.Player.AssingCells(battleFieldCards.CellPlayer);
    }
        public void setInfoData(PropData propData)
        {
            m_curPropData = propData;
            if (propData != null)
            {
                m_Icon_img.Sprite  = propData.prop.icon;
                m_Title_lab.Text   = LocalizeModule.Instance.GetString(propData.prop.name);
                m_Sum_lab.Text     = string.Format("x{0}", propData.num);
                m_Content_lab.Text = LocalizeModule.Instance.GetString(propData.prop.description);
                m_Money_lab.Text   = propData.prop.price.ToString();
                long skillId    = propData.prop.skillId;
                int  tradeLimit = propData.prop.tradeLimit;
                if (skillId > 0)
                {
                    ConfSkill skill = ConfSkill.Get(skillId);
                    if (skill != null && skill.phase <= 3)
                    {
                        if (tradeLimit == 0)
                        {
                            tradeLimit = 1;
                        }
                        else if (tradeLimit == 2)
                        {
                            tradeLimit = 3;
                        }
                    }
                }

                SetPropInfoVisible(true);
                if (tradeLimit == 0)
                {
                    m_MsgNode_obj.SetActive(true);
                    m_SaleUseNode_obj.SetActive(true);
                    m_Sale_btn.SetActive(true);
                    m_Use_btn.SetActive(true);
                    m_NoSaleTip_lab.SetActive(false);
                    m_MultiFunc_btn.SetActive(false);
                    m_ShopTips_lab.SetActive(false);
                    m_currentInfo_enum = PropInfoTypeEnum.None;
                }
                else if (tradeLimit == 1)
                {
                    m_MsgNode_obj.SetActive(true);
                    m_MultiFunc_btn.SetActive(true);
                    m_SaleUseNode_obj.SetActive(true);
                    m_Sale_btn.SetActive(false);
                    m_Use_btn.SetActive(false);
                    m_NoSaleTip_lab.SetActive(false);
                    m_ShopTips_lab.SetActive(false);
                    m_MultiFunc_lab.Text = "Sale";
                    m_currentInfo_enum   = PropInfoTypeEnum.Sale;
                }
                else if (tradeLimit == 2)
                {
                    m_MultiFunc_btn.SetActive(true);
                    m_MsgNode_obj.SetActive(true);
                    m_SaleUseNode_obj.SetActive(false);
                    m_Sale_btn.SetActive(false);
                    m_Use_btn.SetActive(false);
                    m_NoSaleTip_lab.SetActive(true);
                    m_ShopTips_lab.SetActive(false);
                    m_MultiFunc_lab.Text = "Use";
                    m_currentInfo_enum   = PropInfoTypeEnum.Use;
                }
                else if (tradeLimit == 3)
                {
                    m_MsgNode_obj.SetActive(true);
                    m_SaleUseNode_obj.SetActive(false);
                    m_Sale_btn.SetActive(false);
                    m_Use_btn.SetActive(false);
                    m_NoSaleTip_lab.SetActive(false);
                    m_MultiFunc_btn.SetActive(false);
                    m_ShopTips_lab.SetActive(false);
                    m_currentInfo_enum = PropInfoTypeEnum.None;
                }
            }
        }