Example #1
0
 private void SetItemData(Hotfix_LT.Data.MonsterInfoTemplate itemData)
 {
     m_data = CreateItemData(itemData);
     //睡梦之塔特殊处理
     if (BattleReadyHudController.sBattleType == eBattleType.SleepTower)
     {
         //得到当前时第几层
         Hotfix_LT.Data.ClimingTowerTemplate datas = Hotfix_LT.Data.EventTemplateManager.Instance.GetClimingTowerData();
         if (datas != null)
         {
             float param = datas.param;
             int   layer = datas.layer;
             if (m_data != null && m_data.id != 0)
             {
                 m_data.base_ATK   = itemData.base_ATK * (1 + param * layer);
                 m_data.base_DEF   = itemData.base_DEF * (1 + param * layer);
                 m_data.base_MaxHP = itemData.base_MaxHP * (1 + param * layer);
                 m_data.speed      = itemData.speed * (1 + param * layer);
                 m_data.CritP      = itemData.CritP * (1 + param * layer);
                 m_data.CritV      = itemData.CritV * (1 + param * layer);
                 m_data.SpExtra    = itemData.SpExtra * (1 + param * layer);
                 m_data.SpRes      = itemData.SpRes * (1 + param * layer);
             }
         }
     }
     UpdateItem();
 }
Example #2
0
        public void F_SetData(Action <int, int, Action <Hashtable> > onClickChallenge, Data.ClimingTowerTemplate data, int layerArgs)
        {
            m_Data             = data;
            m_OnClickChallenge = onClickChallenge;
            v_HaveSetData      = true;
            v_LeftDoorClick.GetComponent <BoxCollider>().enabled  = data != null;
            v_RightDoorClick.GetComponent <BoxCollider>().enabled = data != null;
            leftDoor.SetData(data, 1);
            rightDoor.SetData(data, 0);
            int curLayer = LTClimingTowerManager.Instance.v_CurrentLayerData.v_CurrentLayer;

            LTUIUtil.SetText(v_Layerlabel, layerArgs.ToString());
            v_Layerlabel.color = layerArgs <curLayer?Color.green :
                                            layerArgs> curLayer ? Color.white : Color.yellow;
        }