Ejemplo n.º 1
0
    // Token: 0x0600031B RID: 795 RVA: 0x0000EEDC File Offset: 0x0000D2DC
    public void OpenWindow(int _mailId)
    {
        this.mailId    = _mailId;
        this.mailIndex = SuperGameMaster.saveData.MailList.FindIndex((MailEventFormat mail) => mail.mailId.Equals(this.mailId));
        if (this.mailIndex == -1)
        {
            return;
        }
        MailEventFormat mailEventFormat = SuperGameMaster.saveData.MailList[this.mailIndex];

        base.gameObject.SetActive(true);
        this.titleText.transform.GetComponentInChildren <Text>().text = mailEventFormat.title;
        this.mainText.transform.GetComponentInChildren <Text>().text  = mailEventFormat.message;
        if (!mailEventFormat.opened)
        {
            SuperGameMaster.saveData.MailList[this.mailIndex].opened = true;
            SuperGameMaster.getCloverPoint(mailEventFormat.CloverPoint);
            SuperGameMaster.GetTicket(mailEventFormat.ticket);
            if (mailEventFormat.itemId != -1)
            {
                SuperGameMaster.GetItem(mailEventFormat.itemId, mailEventFormat.itemStock);
            }
        }
        this.DeleteButton.GetComponent <Button>().interactable = !mailEventFormat.protect;
    }
Ejemplo n.º 2
0
 // Token: 0x060003EF RID: 1007 RVA: 0x000196DC File Offset: 0x00017ADC
 public void GetItem(int MailListIndex)
 {
     SuperGameMaster.saveData.MailList[MailListIndex].opened = true;
     SuperGameMaster.getCloverPoint(SuperGameMaster.saveData.MailList[MailListIndex].CloverPoint);
     SuperGameMaster.GetTicket(SuperGameMaster.saveData.MailList[MailListIndex].ticket);
     if (SuperGameMaster.saveData.MailList[MailListIndex].itemId != -1)
     {
         SuperGameMaster.GetItem(SuperGameMaster.saveData.MailList[MailListIndex].itemId, SuperGameMaster.saveData.MailList[MailListIndex].itemStock);
     }
 }
Ejemplo n.º 3
0
 // Token: 0x06000460 RID: 1120 RVA: 0x0001F764 File Offset: 0x0001DB64
 public void Debug_GetItem()
 {
     SuperGameMaster.getCloverPoint(20000);
     SuperGameMaster.GetTicket(50);
     foreach (ItemDataFormat itemDataFormat in SuperGameMaster.sDataBase.ItemDB.data)
     {
         SuperGameMaster.GetItem(itemDataFormat.id, 20);
     }
     Debug.Log("[DebugButton] アイテム取得");
 }
Ejemplo n.º 4
0
    // Token: 0x06000400 RID: 1024 RVA: 0x0001A2F0 File Offset: 0x000186F0
    public void GetPrize()
    {
        PrizeDataFormat prizeDataFormat = SuperGameMaster.sDataBase.get_PrizeDB_forId(this.selectPrizeId);

        if (prizeDataFormat.itemId != -1)
        {
            SuperGameMaster.GetItem(prizeDataFormat.itemId, prizeDataFormat.stock);
        }
        else
        {
            SuperGameMaster.GetTicket(prizeDataFormat.stock);
        }
        this.CloseScrollView();
    }
Ejemplo n.º 5
0
    // Token: 0x0600026D RID: 621 RVA: 0x00008AA8 File Offset: 0x00006EA8
    public void CloverGet()
    {
        Debug.LogWarning("取得判定");
        int num = this.element;

        if (num != 0)
        {
            if (num == 1)
            {
                SuperGameMaster.GetItem(1000, this.point);
                if (!base.GetComponentInParent <CloverFarm>().ConfilmUI.activeSelf&& SuperGameMaster.tutorial.ClockOk() && !base.GetComponentInParent <CloverFarm>().ConfilmUI.GetComponentInParent <UIMaster_MainOut>().Check_blockUI())
                {
                    UIMaster_MainOut UI_Cmp = base.GetComponentInParent <CloverFarm>().ConfilmUI.GetComponentInParent <UIMaster_MainOut>();
                    UI_Cmp.freezeObject(true);
                    UI_Cmp.blockUI(true, new Color(0f, 0f, 0f, 0f));
                    ConfilmPanel confilm = base.GetComponentInParent <CloverFarm>().ConfilmUI.GetComponent <ConfilmPanel>();
                    confilm.OpenPanel(string.Empty);
                    confilm.AddContents(UnityEngine.Object.Instantiate <GameObject>(base.GetComponentInParent <CloverFarm>().AddConfirm_pref));
                    confilm.ResetOnClick_Screen();
                    confilm.SetOnClick_Screen(delegate
                    {
                        confilm.ClosePanel();
                    });
                    confilm.SetOnClick_Screen(delegate
                    {
                        UI_Cmp.freezeObject(false);
                    });
                    confilm.SetOnClick_Screen(delegate
                    {
                        UI_Cmp.blockUI(false);
                    });
                }
            }
        }
        else
        {
            SuperGameMaster.getCloverPoint(this.point);
        }
        this.point = 0;
        base.GetComponentInParent <CloverFarm>().Recycle(this.index);
    }
Ejemplo n.º 6
0
 // Token: 0x0600038A RID: 906 RVA: 0x00014F24 File Offset: 0x00013324
 public void LoadResult()
 {
     this.InfoButton.SetActive(true);
     this.InfoButtonPage         = 0;
     this.InfoButtonImage.sprite = this.LabelSprites[0];
     if (SuperGameMaster.GetHome())
     {
         this.InfoButtonText.GetComponent <Text>().text = SuperGameMaster.GetFrogName() + "が\n帰っています";
     }
     else
     {
         this.InfoButtonText.GetComponent <Text>().text = SuperGameMaster.GetFrogName() + "が\n帰っていたようです";
     }
     this.nowPage = 0;
     this.pageMax = 0;
     this.TravelPanel.transform.localPosition = Vector3.zero;
     while (SuperGameMaster.evtMgr.search_ActEvtIndex_forType(TimerEvent.Type.BackHome) != -1)
     {
         int index = SuperGameMaster.evtMgr.search_ActEvtIndex_forType(TimerEvent.Type.BackHome);
         EventTimerFormat eventTimerFormat = SuperGameMaster.evtMgr.get_ActEvt(index);
         int num  = eventTimerFormat.evtValue[1];
         int num2 = SuperGameMaster.get_Flag(Flag.Type.TRAVEL_TIMEMIN);
         int num3 = SuperGameMaster.get_Flag(Flag.Type.TRAVEL_TIMEMAX);
         if (num2 == 0)
         {
             SuperGameMaster.set_Flag(Flag.Type.TRAVEL_TIMEMIN, num);
         }
         if (num2 > num)
         {
             SuperGameMaster.set_Flag(Flag.Type.TRAVEL_TIMEMIN, num);
         }
         if (num3 < num)
         {
             SuperGameMaster.set_Flag(Flag.Type.TRAVEL_TIMEMAX, num);
         }
         bool success = false;
         if (eventTimerFormat.evtValue[0] == 0)
         {
             success = true;
         }
         List <int> list = new List <int>(eventTimerFormat.evtValue);
         list.RemoveAt(0);
         list.RemoveAt(0);
         Vector3 position = new Vector3(this.TravelResultPref.transform.localPosition.x, this.TravelResultPref.transform.localPosition.y, 0f);
         position.x += (float)(this.pageWidth * this.pageMax);
         GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.TravelResultPref, position, Quaternion.identity);
         gameObject.transform.SetParent(this.TravelPanel.GetComponent <RectTransform>(), false);
         gameObject.GetComponent <TravelResultPanel>().Controller = base.gameObject;
         gameObject.GetComponent <TravelResultPanel>().CreateResult(success, eventTimerFormat.id, new List <int>(list), eventTimerFormat.evtId);
         SuperGameMaster.getCloverPoint(list[0]);
         SuperGameMaster.GetTicket(list[1]);
         list.RemoveAt(0);
         list.RemoveAt(0);
         for (int i = 0; i < list.Count; i += 2)
         {
             SuperGameMaster.GetItem(list[i], list[i + 1]);
         }
         SuperGameMaster.evtMgr.delete_ActEvt_forId(eventTimerFormat.id);
         this.pageMax++;
     }
     this.S_FlickChecker.stopFlick(true);
     SuperGameMaster.audioMgr.PlaySE(Define.SEDict["SE_Enter"]);
 }
Ejemplo n.º 7
0
    // Token: 0x060002E0 RID: 736 RVA: 0x0000D180 File Offset: 0x0000B580
    public void BuyItem()
    {
        ShopDataFormat shopDataFormat = SuperGameMaster.sDataBase.get_ShopDB(this.selectShopIndex);
        ItemDataFormat itemDataFormat = SuperGameMaster.sDataBase.get_ItemDB_forId(shopDataFormat.itemId);

        SuperGameMaster.getCloverPoint(-itemDataFormat.price);
        SuperGameMaster.GetItem(shopDataFormat.itemId, 1);
        base.GetComponentInParent <UIMaster>().OnSave();
        if (itemDataFormat.type != Item.Type.LunchBox)
        {
            IEnumerator enumerator = base.transform.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    object    obj       = enumerator.Current;
                    Transform transform = (Transform)obj;
                    if (transform.name.Equals("DisplayItemButton(Clone)") && transform.GetComponent <DisplayItemButton>().shopIndex == this.selectShopIndex)
                    {
                        transform.GetComponent <DisplayItemButton>().SetSoldOut();
                        transform.GetComponent <DisplayItemButton>().NumDelete();
                    }
                }
            }
            finally
            {
                IDisposable disposable;
                if ((disposable = (enumerator as IDisposable)) != null)
                {
                    disposable.Dispose();
                }
            }
            this.selectShopIndex = -1;
            this.SetInfoPanelData(-1, Vector3.zero);
            base.GetComponent <FlickCheaker>().stopFlick(true);
            ConfilmPanel confilm = this.ConfilmUI.GetComponent <ConfilmPanel>();
            confilm.OpenPanel(itemDataFormat.name + "\nを買いました");
            confilm.ResetOnClick_Screen();
            confilm.SetOnClick_Screen(delegate
            {
                confilm.ClosePanel();
            });
            confilm.SetOnClick_Screen(delegate
            {
                this.GetComponent <FlickCheaker>().stopFlick(false);
            });
        }
        if (SuperGameMaster.tutorial.TutorialComplete() && (itemDataFormat.type != Item.Type.Tool || SuperGameMaster.GetFirstFlag(Flag.FIRST_BUY_TOOL)) && UnityEngine.Random.Range(0, 100) < 15)
        {
            SuperGameMaster.GetTicket(1);
            base.GetComponentInParent <UIMaster>().OnSave();
            if (itemDataFormat.type != Item.Type.LunchBox)
            {
                ConfilmPanel confilm = this.ConfilmUI.GetComponent <ConfilmPanel>();
                confilm.SetOnClick_Screen(delegate
                {
                    confilm.OpenPanel(string.Empty);
                });
                confilm.SetOnClick_Screen(delegate
                {
                    confilm.AddContents(UnityEngine.Object.Instantiate <GameObject>(this.AddConfirm_pref));
                });
                confilm.SetOnClick_Screen(delegate
                {
                    confilm.ResetOnClick_Screen();
                });
                confilm.SetOnClick_Screen(delegate
                {
                    this.GetComponent <FlickCheaker>().stopFlick(true);
                });
                confilm.SetOnClick_Screen(delegate
                {
                    confilm.SetOnClick_Screen(delegate
                    {
                        confilm.ClosePanel();
                    });
                });
                confilm.SetOnClick_Screen(delegate
                {
                    confilm.SetOnClick_Screen(delegate
                    {
                        this.GetComponent <FlickCheaker>().stopFlick(false);
                    });
                });
            }
            else
            {
                base.GetComponent <FlickCheaker>().stopFlick(true);
                ConfilmPanel confilm = this.ConfilmUI.GetComponent <ConfilmPanel>();
                confilm.OpenPanel(string.Empty);
                confilm.AddContents(UnityEngine.Object.Instantiate <GameObject>(this.AddConfirm_pref));
                confilm.ResetOnClick_Screen();
                confilm.SetOnClick_Screen(delegate
                {
                    confilm.ClosePanel();
                });
                confilm.SetOnClick_Screen(delegate
                {
                    this.GetComponent <FlickCheaker>().stopFlick(false);
                });
            }
        }
        if (itemDataFormat.type == Item.Type.Tool && !SuperGameMaster.GetFirstFlag(Flag.FIRST_BUY_TOOL))
        {
            SuperGameMaster.SetFirstFlag(Flag.FIRST_BUY_TOOL);
            base.GetComponent <FlickCheaker>().stopFlick(true);
            HelpPanel help = base.GetComponentInParent <UIMaster_Shop>().HelpUI.GetComponent <HelpPanel>();
            help.OpenPanel(string.Concat(new string[]
            {
                "<color=#61a8c7><b>どうぐ</b></color>をしたくしてあげると\n",
                SuperGameMaster.GetFrogName(),
                "の行き先に影響をあたえます\n色んな<color=#61a8c7><b>どうぐ</b></color>を用意して",
                SuperGameMaster.GetFrogName(),
                "に\n旅の提案をしてあげましょう"
            }));
            help.ResetOnClick_Screen();
            help.SetOnClick_Screen(delegate
            {
                help.ClosePanel();
            });
            help.SetOnClick_Screen(delegate
            {
                this.GetComponent <FlickCheaker>().stopFlick(false);
            });
            help.gameObject.SetActive(false);
            ConfilmPanel component = this.ConfilmUI.GetComponent <ConfilmPanel>();
            component.SetOnClick_Screen(delegate
            {
                help.gameObject.SetActive(true);
            });
            component.SetOnClick_Screen(delegate
            {
                this.GetComponent <FlickCheaker>().stopFlick(true);
            });
        }
        SuperGameMaster.audioMgr.StopSE();
        SuperGameMaster.audioMgr.PlaySE(Define.SEDict["SE_Buy"]);
    }