Exemplo n.º 1
0
 // Token: 0x06000293 RID: 659 RVA: 0x00009E94 File Offset: 0x00008294
 public void Enable()
 {
     if (!this.DeskPanel)
     {
         this.tmpBagList = SuperGameMaster.GetBagList_virtual();
         if (this.tmpBagList.Count == 0)
         {
             this.tmpBagList = SuperGameMaster.GetBagList();
         }
     }
     else
     {
         this.tmpBagList = SuperGameMaster.GetDeskList_virtual();
         if (this.tmpBagList.Count == 0)
         {
             this.tmpBagList = SuperGameMaster.GetDeskList();
         }
     }
     this.SetPanelButton();
     if (!this.DeskPanel)
     {
         this.ChangeBtnEnable(SuperGameMaster.GetStandby());
     }
     else
     {
         this.ResetBtnEnableCheck();
     }
     this.ChangeButton.SetActive(SuperGameMaster.GetHome());
 }
Exemplo n.º 2
0
    // Token: 0x0600028A RID: 650 RVA: 0x00009BF0 File Offset: 0x00007FF0
    public void CheckEmpty()
    {
        List <int> bagList  = SuperGameMaster.GetBagList();
        List <int> deskList = SuperGameMaster.GetDeskList();
        bool       active   = true;

        if (bagList[0] != -1)
        {
            active = false;
        }
        if (deskList[0] != -1 || deskList[1] != -1)
        {
            active = false;
        }
        if (!SuperGameMaster.tutorial.TutorialComplete())
        {
            active = false;
        }
        this.EmptyIcon.SetActive(active);
    }
Exemplo n.º 3
0
    // Token: 0x060003DB RID: 987 RVA: 0x000184F4 File Offset: 0x000168F4
    public void CreateButton(Item.Type itemType)
    {
        RectTransform component = this.contentsList.GetComponent <RectTransform>();

        this.DeleteButtonAll();
        List <int> list = new List <int>();

        if (this.listMode == ItemScrollView.Mode.Equip)
        {
            list = this.CallObj.GetComponent <BagPanel>().Get_tmpItemListAll();
        }
        else
        {
            list.AddRange(SuperGameMaster.GetBagList());
            list.AddRange(SuperGameMaster.GetDeskList());
        }
        using (List <ItemListFormat> .Enumerator enumerator = SuperGameMaster.saveData.ItemList.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                ItemListFormat item           = enumerator.Current;
                ItemDataFormat itemDataFormat = SuperGameMaster.sDataBase.get_ItemDB_forId(item.id);
                if (itemDataFormat != null)
                {
                    if (itemType == Item.Type.NONE || itemDataFormat.type == itemType)
                    {
                        GameObject gameObject;
                        if (itemDataFormat.type != Item.Type.Specialty)
                        {
                            gameObject = UnityEngine.Object.Instantiate <GameObject>(this.btnPref);
                            gameObject.transform.SetParent(component, false);
                            gameObject.GetComponent <ItemButton>().CngItemName(itemDataFormat.name);
                            gameObject.GetComponent <ItemButton>().CngItemInfo(itemDataFormat.info);
                        }
                        else
                        {
                            gameObject = UnityEngine.Object.Instantiate <GameObject>(this.spe_btnPref);
                            gameObject.transform.SetParent(this.spe_contentsList.GetComponent <RectTransform>(), false);
                        }
                        gameObject.GetComponent <ItemButton>().setItemId(itemDataFormat.id, itemDataFormat.type);
                        gameObject.GetComponent <ItemButton>().CngImage(itemDataFormat.img);
                        gameObject.GetComponent <ItemButton>().ItemScrollView = base.gameObject;
                        ItemScrollView.Mode mode = this.listMode;
                        if (mode != ItemScrollView.Mode.View)
                        {
                            if (mode != ItemScrollView.Mode.Present)
                            {
                                if (mode == ItemScrollView.Mode.Equip)
                                {
                                    if (itemDataFormat.spend)
                                    {
                                        int num = item.stock;
                                        if (list.FindIndex((int itemId) => itemId.Equals(item.id)) != -1)
                                        {
                                            foreach (int num2 in list)
                                            {
                                                if (num2 == item.id)
                                                {
                                                    num--;
                                                }
                                            }
                                        }
                                        gameObject.GetComponent <ItemButton>().CngStockNum(num);
                                        if (this.CallObj.GetComponent <BagPanel>().tmpBagList[this.setId] == itemDataFormat.id)
                                        {
                                            gameObject.GetComponent <ItemButton>().Fade(new Color(0.7f, 0.7f, 0.7f));
                                            gameObject.GetComponent <ItemButton>().SetCheckImage(true);
                                            gameObject.GetComponent <ItemButton>().setItemId(-2, Item.Type._ElmMax);
                                        }
                                        else if (num <= 0)
                                        {
                                            UnityEngine.Object.Destroy(gameObject);
                                        }
                                    }
                                    else
                                    {
                                        if (list.FindIndex((int itemId) => itemId.Equals(item.id)) != -1)
                                        {
                                            gameObject.GetComponent <Button>().interactable = false;
                                            if (this.CallObj.GetComponent <BagPanel>().tmpBagList[this.setId] == itemDataFormat.id)
                                            {
                                                gameObject.GetComponent <ItemButton>().SetCheckImage(true);
                                                gameObject.GetComponent <ItemButton>().Fade(new Color(0.7f, 0.7f, 0.7f));
                                                gameObject.GetComponent <ItemButton>().setItemId(-2, Item.Type._ElmMax);
                                                gameObject.GetComponent <Button>().interactable = true;
                                            }
                                            else
                                            {
                                                gameObject.GetComponent <ItemButton>().Fade(new Color(0.7f, 0.7f, 0.7f));
                                            }
                                        }
                                        gameObject.GetComponent <ItemButton>().CngStockNum(-2);
                                    }
                                }
                            }
                            else if (itemDataFormat.spend)
                            {
                                int num3 = item.stock;
                                if (list.FindIndex((int itemId) => itemId.Equals(item.id)) != -1)
                                {
                                    foreach (int num4 in list)
                                    {
                                        if (num4 == item.id)
                                        {
                                            num3--;
                                        }
                                    }
                                }
                                if (num3 > 0)
                                {
                                    gameObject.GetComponent <ItemButton>().CngStockNum(num3);
                                }
                                else
                                {
                                    UnityEngine.Object.Destroy(gameObject);
                                }
                            }
                            else
                            {
                                gameObject.GetComponent <ItemButton>().CngStockNum(-2);
                            }
                        }
                        else
                        {
                            gameObject.GetComponent <Button>().enabled = false;
                            if (itemDataFormat.spend)
                            {
                                int num5 = item.stock;
                                if (list.FindIndex((int itemId) => itemId.Equals(item.id)) != -1)
                                {
                                    foreach (int num6 in list)
                                    {
                                        if (num6 == item.id)
                                        {
                                            num5--;
                                        }
                                    }
                                }
                                if (num5 > 0)
                                {
                                    gameObject.GetComponent <ItemButton>().CngStockNum(num5);
                                }
                                else
                                {
                                    UnityEngine.Object.Destroy(gameObject);
                                }
                            }
                            else
                            {
                                gameObject.GetComponent <ItemButton>().CngStockNum(-2);
                            }
                        }
                    }
                }
            }
        }
    }
Exemplo n.º 4
0
    // Token: 0x060003D1 RID: 977 RVA: 0x00017DE4 File Offset: 0x000161E4
    public void GetBagList()
    {
        string text = "\n";

        text += "\n\n【支度リスト】 (bagList/DeskList) ~~~~~~~~~~~ \n";
        text += "\u3000かばん:\n";
        foreach (int num in SuperGameMaster.GetBagList())
        {
            if (num == -1)
            {
                text += "\u3000\u3000\u3000\u3000\u3000- ,\n";
            }
            else
            {
                ItemDataFormat itemDataFormat = new ItemDataFormat();
                itemDataFormat = SuperGameMaster.sDataBase.get_ItemDB_forId(num);
                text           = text + "\u3000\u3000\u3000\u3000\u3000" + itemDataFormat.name + ",\n";
            }
        }
        text += "\u3000つくえ:\n";
        foreach (int num2 in SuperGameMaster.GetDeskList())
        {
            if (num2 == -1)
            {
                text += "\u3000\u3000\u3000\u3000\u3000\u3000- ,\n";
            }
            else
            {
                ItemDataFormat itemDataFormat2 = new ItemDataFormat();
                itemDataFormat2 = SuperGameMaster.sDataBase.get_ItemDB_forId(num2);
                text            = text + "\u3000\u3000\u3000\u3000\u3000" + itemDataFormat2.name + ",\n";
            }
        }
        text += "\n~~~~~~~~~(仮想リスト)~~~~~~~~~\n";
        text += "\u3000かばん:\n";
        foreach (int num3 in SuperGameMaster.GetBagList_virtual())
        {
            if (num3 == -1)
            {
                text += "\u3000\u3000\u3000\u3000\u3000\u3000- ,\n";
            }
            else
            {
                ItemDataFormat itemDataFormat3 = new ItemDataFormat();
                itemDataFormat3 = SuperGameMaster.sDataBase.get_ItemDB_forId(num3);
                text            = text + "\u3000\u3000\u3000\u3000\u3000" + itemDataFormat3.name + ",\n";
            }
        }
        text += "\u3000つくえ:\n";
        foreach (int num4 in SuperGameMaster.GetDeskList_virtual())
        {
            if (num4 == -1)
            {
                text += "\u3000\u3000\u3000\u3000\u3000\u3000- ,\n";
            }
            else
            {
                ItemDataFormat itemDataFormat4 = new ItemDataFormat();
                itemDataFormat4 = SuperGameMaster.sDataBase.get_ItemDB_forId(num4);
                text            = text + "\u3000\u3000\u3000\u3000\u3000" + itemDataFormat4.name + ",\n";
            }
        }
        this.Result_text.GetComponent <Text>().text = text;
    }