コード例 #1
0
    public override void updateItem(GameObject item, int index)
    {
        //	base.updateItem (item, index);
        ButtonIntensifyEquip button = item.GetComponent <ButtonIntensifyEquip> ();

        button.updateButton(RoleList [index] as  Equip);
    }
コード例 #2
0
 void setShower(ButtonIntensifyEquip _shower, string spName)
 {
     shower = _shower;
     if (_shower != null)
     {
         _shower.updateButton(equip);
     }
     if (spName == "")
     {
         selectPic.gameObject.SetActive(false);
     }
     else
     {
         selectPic.gameObject.SetActive(true);
         selectPic.spriteName = spName;
         if (spName == MAINSELECT)
         {
             selectPic.height = 90;
             selectPic.width  = 90;
         }
         else
         {
             selectPic.height = 70;
             selectPic.width  = 64;
         }
     }
 }
コード例 #3
0
 void cleanBtton()
 {
     equipImage.gameObject.SetActive(false);
     equipImage.mainTexture = null;
     level.text             = "";
     qualityBack.gameObject.SetActive(false);
     equip  = null;
     shower = null;
     selectPic.gameObject.SetActive(false);
 }
コード例 #4
0
    public override void initButton(int i)
    {
        if (nodeList [i] == null)
        {
            nodeList [i] = NGUITools.AddChild(gameObject, equipButtonPrefab);
        }

        nodeList [i].name = StringKit.intToFixString(i + 1);
        ButtonIntensifyEquip button = nodeList [i].GetComponent <ButtonIntensifyEquip> ();

        button.LockOnClick = false;
        buttonList.Add(button);
        button.fatherWindow = fatherWindow;
        button.Initialize(RoleList [i] as Equip);
    }
コード例 #5
0
    //一键选择
    public void OneKeyChoose()
    {
        cleanAllFoodData();
        IntensifyEquipManager.Instance.clearFoodEquip();

        List <Equip> onekeyListEat = IntensifyEquipManager.Instance.getOneKeySacrificeEat();
        List <Equip> onekeyList    = IntensifyEquipManager.Instance.getOneKeySacrifice();

        ListKit.AddRange(onekeyListEat, onekeyList);

        if (onekeyListEat == null || onekeyListEat.Count <= 0)
        {
            UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("Intensify7"));
            return;
        }

        for (int i = 0; i < onekeyListEat.Count; i++)
        {
            //没空巢就断掉
            ButtonIntensifyEquip ctrl = selectOneEmptyCastShower();
            if (ctrl == null)
            {
                break;
            }
            if (isOneOfTheCaster(onekeyListEat [i].uid))
            {
                continue;
            }

            if (onekeyListEat [i].getQualityId() <= IntensifyEquipManager.Choose)
            {
//				content.updateButton(onekeyListEat [i]);
                ctrl.updateButton(onekeyListEat [i]);
                IntensifyEquipManager.Instance.setFoodEquip(onekeyListEat [i]);
            }
        }

        onekeyListEat = IntensifyEquipManager.Instance.getFoodEquip();
        if (onekeyListEat == null || onekeyListEat.Count <= 0)
        {
            UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("Intensify7"));
        }

        updateContent();
        recalculateEXP();
        recalcuateRefineEXP();
        changeButton();
    }
コード例 #6
0
    //主卡和食物卡点击处理函数
    public void updateButton(ButtonIntensifyEquip buttonEquip)
    {
        if (buttonEquip.equip == null)
        {
            return;
        }

        ButtonIntensifyEquip button;

        for (int i = 0; i < nodeList.Count; i++)
        {
            if (nodeList[i] != null)
            {
                button = nodeList [i].GetComponent <ButtonIntensifyEquip> ();
                if (button.equip.uid == buttonEquip.equip.uid)
                {
                    button.DoClickEvent();
                    return;
                }
            }
        }
        //点击食物卡,食物卡不在容器中显示
        buttonEquip.putOff();
    }
コード例 #7
0
 public void removeFoodEquip(ButtonIntensifyEquip button)
 {
     button.cleanData();
 }
コード例 #8
0
    public void updateButton(Equip _equip)
    {
        if (_equip == null)
        {
            cleanBtton();
            return;
        }
        else
        {
            resetData();
            equip = _equip;
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + equip.getIconId(), equipImage);
            qualityBack.spriteName = QualityManagerment.qualityIDToIconSpriteName(equip.getQualityId());
            level.text             = "Lv." + equip.getLevel();
            if (equip.equpStarState > 0 && starLvel != null)
            {
                starLvel.gameObject.SetActive(true);
                starLvel.text = "+" + equip.equpStarState;
            }
            else
            {
                starLvel.gameObject.SetActive(false);
            }

            if (isShower)
            {
                return;
            }

            if (win.hasMainEquip() == false && isEat())
            {
                lockButtonByEat();
                return;
            }

            if (win.hasMainEquip() == false && isFullLevel() == true)
            {
                lockButtonByFullLevel();
                return;
            }

            if (win.hasMainEquip() && isOccupy() == true && win.main.equip.uid != equip.uid)
            {
                lockButtonByOccupy();
                return;
            }
            //下面是做选中标记

            if (equip != null && win.main.equip != null && equip.uid == win.main.equip.uid)
            {
                setShower(win.main, MAINSELECT);
                isChoose = true;
                return;
            }

            ButtonIntensifyEquip button = win.isOneOfTheCaster(equip.uid);
            if (button != null)
            {
                setShower(button, CASTSELECT);
                isChoose = true;
                return;
            }
        }
    }
コード例 #9
0
 void cleanShower()
 {
     shower = null;
     selectPic.gameObject.SetActive(false);
 }