Пример #1
0
 public void StartSpinButton(YGUISystem.GUIButton button)
 {
     button.Button.enabled = false;
     button.Lable.Text.enabled = false;
     button.Button.animator.SetBool("Spin", true);
     button.Button.audio.Play();
 }
Пример #2
0
    public void OnClickEvolution(GUIInventorySlot invSlot, GUIInventorySlot.GUIPriceGemButton priceGemButton, YGUISystem.GUIPriceButton button, ItemObject selectedItem)
    {
        if (selectedItem.Item.Evolution < selectedItem.Item.RefItem.maxEvolution)
        {
            if (button.TryToPay())
            {
                invSlot.IconAnimator.SetTrigger("Levelup");
                StartSpinButton(priceGemButton.m_priceButton.GUIImageButton);
                ++selectedItem.Item.Evolution;
                selectedItem.Item.Level = 1;

                switch(selectedItem.Item.RefItem.type)
                {
                case ItemData.Type.Follower:
                    ItemFollowerData itemFollowerData = selectedItem.Item as ItemFollowerData;
                    itemFollowerData.m_follower.EvolutionUp();
                    itemFollowerData.NoApplyOptions(itemFollowerData.m_follower);
                    itemFollowerData.Use(itemFollowerData.m_follower);

                    Const.GetWindowGui(Const.WindowGUIType.EvolutionItemGUI).GetComponent<EvolutionItemGUI>().SetItem(itemFollowerData.m_follower);
                    Const.GetWindowGui(Const.WindowGUIType.EvolutionItemGUI).SetActive(true);
                    break;
                case ItemData.Type.Stat:
                    break;
                case ItemData.Type.Weapon:
                    m_champ.WeaponHolder.EvolutionUp(selectedItem.Item.RefItem.id);
                    selectedItem.Item.NoApplyOptions(m_champ);
                    selectedItem.Item.Use(m_champ);
                    break;
                }

                if (selectedItem.Item.Evolution == selectedItem.Item.RefItem.maxEvolution)
                {
                    priceGemButton.SetPrices(Const.ButtonRole.Nothing, null);
                }

                invSlot.ItemDesc = selectedItem.Item.Description();
                SetButtonRole(Const.ButtonRole.Levelup, invSlot, priceGemButton, selectedItem);

                GPlusPlatform.Instance.AnalyticsTrackEvent("Weapon", "Evolution", selectedItem.Item.RefItem.name + "_Evolution:" + selectedItem.Item.Evolution, 0);
            }
            else
            {
                if (priceGemButton.m_gemButton == button)
                    PopupShop();
            }
        }
    }
Пример #3
0
 public TabDesc(int index, MultiLang.ID name, ItemData.Type[] itemTypes, YGUISystem.GUIButton tab)
 {
     m_index = index;
     m_tab = tab;
     m_checked = tab.Button.transform.Find("Checked").gameObject;
     m_tab.Lable.Text.text = RefData.Instance.RefTexts(name);
     m_itemTypes = itemTypes;
     m_tabImage = tab.Button.gameObject.GetComponent<Image>();
 }
Пример #4
0
 public void StartSpinButton(YGUISystem.GUIButton button)
 {
     button.Button.audio.Play();
 }
Пример #5
0
    public void OnClickUnlock(GUIInventorySlot invSlot, GUIInventorySlot.GUIPriceGemButton priceGemButton, YGUISystem.GUIPriceButton button, ItemObject selectedItem)
    {
        if (selectedItem.Item.Lock == true)
        {
            if (button.TryToPay() == true)
            {
                invSlot.IconAnimator.SetTrigger("Levelup");

                selectedItem.Item.Lock = false;
                selectedItem.Item.Level = 1;

                invSlot.ItemDesc = selectedItem.Item.Description();

                SetButtonRole(Const.ButtonRole.Levelup, invSlot, priceGemButton, selectedItem);
                switch(selectedItem.Item.RefItem.type)
                {
                case ItemData.Type.Follower:
                    selectedItem.Item.Equip(m_champ);
                    break;
                case ItemData.Type.Stat:
                    selectedItem.Item.Equip(m_champ);
                    break;
                case ItemData.Type.Weapon:
                    selectedItem.Item.Equip(m_champ);
                    break;
                }
            }
            else
            {
                if (priceGemButton.m_gemButton == button)
                    PopupShop();
            }
        }
    }