コード例 #1
0
    public void SetBG()
    {
        EVENT_DAILY_DUNGEON_INFO dailyDungeonInfo = EVENT_DAILY_DUNGEON_DATA.GetInstance().GetDailyDungeonInfo(1, this.m_nDayOfWeek);

        if (dailyDungeonInfo == null)
        {
            this.Close();
            return;
        }
        this.m_szBackImage = "UI/DailyDungeon/" + dailyDungeonInfo.szBGIMG;
        this.m_dtBG.SetTextureFromBundle(this.m_szBackImage);
        if (this.m_goBackTexture != null)
        {
            Texture2D texture = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_szBackImage);

            if (texture == null)
            {
                NrTSingleton <UIImageBundleManager> .Instance.RequestBundleImage(this.m_szBackImage, new PostProcPerItem(this.SetBundleImage));
            }
            else
            {
                Renderer component = this.m_goBackTexture.GetComponent <Renderer>();
                if (component != null)
                {
                    component.material.mainTexture = texture;
                }
            }
        }
    }
コード例 #2
0
    public void OnChangeDifficult(object a_oObject)
    {
        DailyDungeon_Main_Dlg dailyDungeon_Main_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.DAILYDUNGEON_MAIN) as DailyDungeon_Main_Dlg;

        if (dailyDungeon_Main_Dlg == null)
        {
            this.Close();
            return;
        }
        IUIListObject            selectItem = this.m_nlDifficulty.GetSelectItem();
        EVENT_DAILY_DUNGEON_INFO eVENT_DAILY_DUNGEON_INFO = selectItem.Data as EVENT_DAILY_DUNGEON_INFO;

        if ((int)dailyDungeon_Main_Dlg.Difficult == (int)eVENT_DAILY_DUNGEON_INFO.i8Difficulty)
        {
            this.Close();
            return;
        }
        dailyDungeon_Main_Dlg.SetDifficuly(eVENT_DAILY_DUNGEON_INFO.i8Difficulty);
        this.Close();
    }
コード例 #3
0
 public override bool ParseDataFromNDT(TsDataReader dr)
 {
     foreach (TsDataReader.Row data in dr)
     {
         EVENT_DAILY_DUNGEON_INFO eVENT_DAILY_DUNGEON_INFO = new EVENT_DAILY_DUNGEON_INFO();
         eVENT_DAILY_DUNGEON_INFO.SetData(data);
         if (this.m_dicDailyDungeonData.ContainsKey(eVENT_DAILY_DUNGEON_INFO.i8DayOfWeek))
         {
             Dictionary <sbyte, EVENT_DAILY_DUNGEON_INFO> dictionary = this.m_dicDailyDungeonData[eVENT_DAILY_DUNGEON_INFO.i8DayOfWeek];
             if (dictionary != null && !dictionary.ContainsKey(eVENT_DAILY_DUNGEON_INFO.i8Difficulty))
             {
                 dictionary.Add(eVENT_DAILY_DUNGEON_INFO.i8Difficulty, eVENT_DAILY_DUNGEON_INFO);
             }
         }
         else
         {
             Dictionary <sbyte, EVENT_DAILY_DUNGEON_INFO> dictionary2 = new Dictionary <sbyte, EVENT_DAILY_DUNGEON_INFO>();
             dictionary2.Add(eVENT_DAILY_DUNGEON_INFO.i8Difficulty, eVENT_DAILY_DUNGEON_INFO);
             this.m_dicDailyDungeonData.Add(eVENT_DAILY_DUNGEON_INFO.i8DayOfWeek, dictionary2);
         }
     }
     return(true);
 }
コード例 #4
0
    public void SetInfo(int nIndex, int nDayOfWeek, bool bReward, bool bClear)
    {
        sbyte b = (sbyte)NrTSingleton <DailyDungeonManager> .Instance.GetCurrWeekofDay();

        string empty      = string.Empty;
        long   num        = this.MaxResetCount();
        long   resetCount = NrTSingleton <DailyDungeonManager> .Instance.GetResetCount();

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3441"),
            "count1",
            resetCount.ToString(),
            "count2",
            num.ToString()
        });

        this.m_lbLimitCount.Text = empty;
        EVENT_DAILY_DUNGEON_INFO dailyDungeonInfo = EVENT_DAILY_DUNGEON_DATA.GetInstance().GetDailyDungeonInfo(1, (sbyte)nDayOfWeek);

        if (dailyDungeonInfo == null)
        {
            return;
        }
        if (bReward)
        {
            this.m_dtSatge[nIndex].enabled = true;
            this.m_dtSatge[nIndex].SetTextureFromBundle("UI/" + dailyDungeonInfo.szClose);
            this.m_btStage[nIndex].controlIsEnabled = true;
            this.m_btStage[nIndex].Click            = null;
            this.m_dtSatge_Lock1[nIndex].Visible    = true;
            this.m_dtSatge_Lock2[nIndex].Visible    = true;
            this.m_btStage_Reset[nIndex].Visible    = true;
            this.m_btStage_Reset[nIndex].Data       = (sbyte)nDayOfWeek;
            this.m_btStage_Reset[nIndex].Click      = new EZValueChangedDelegate(this.ClickDailyDungeonReset);
            if (resetCount >= num)
            {
                this.m_dtSatge_Lock1[nIndex].Visible = false;
                this.m_dtSatge_Lock2[nIndex].Visible = false;
                this.m_btStage_Reset[nIndex].Visible = false;
                this.m_btStage_Reset[nIndex].Click   = null;
            }
        }
        else if ((int)b == 0 || (int)b == 6)
        {
            if (bClear && !bReward)
            {
                this.m_dtSatge[nIndex].enabled = true;
                this.m_dtSatge[nIndex].SetTextureFromBundle("UI/" + dailyDungeonInfo.szClose);
                this.m_dtSatge[nIndex].SetTextureFromBundle("UI/" + dailyDungeonInfo.szOpen);
                this.m_btStage[nIndex].controlIsEnabled = true;
                this.m_btStage[nIndex].Data             = (sbyte)(nIndex + 1);
                this.m_btStage[nIndex].Click            = new EZValueChangedDelegate(this.ClickDailyDungeonOpen);
                this.m_dtSatge_Lock1[nIndex].Visible    = true;
                this.m_dtSatge_Lock2[nIndex].Visible    = true;
                this.m_btStage_Reset[nIndex].Visible    = true;
                this.m_btStage_Reset[nIndex].Data       = (sbyte)(nIndex + 1);
                Button expr_263 = this.m_btStage_Reset[nIndex];
                expr_263.Click = (EZValueChangedDelegate)Delegate.Combine(expr_263.Click, new EZValueChangedDelegate(this.ClickDailyDungeonReset));
            }
        }
        this.m_dtSatge[nIndex].enabled = true;
        this.m_dtSatge[nIndex].SetTextureFromBundle("UI/" + dailyDungeonInfo.szClose);
        this.m_dtSatge[nIndex].SetTextureFromBundle("UI/" + dailyDungeonInfo.szOpen);
        this.m_btStage[nIndex].controlIsEnabled = true;
        this.m_btStage[nIndex].Data             = (sbyte)(nIndex + 1);
        this.m_btStage[nIndex].Click            = new EZValueChangedDelegate(this.ClickDailyDungeonOpen);
        this.m_dtSatge_Lock1[nIndex].Visible    = true;
        this.m_dtSatge_Lock2[nIndex].Visible    = true;
        this.m_btStage_Reset[nIndex].Visible    = true;
        this.m_btStage_Reset[nIndex].Data       = (sbyte)(nIndex + 1);
        Button expr_358 = this.m_btStage_Reset[nIndex];

        expr_358.Click = (EZValueChangedDelegate)Delegate.Combine(expr_358.Click, new EZValueChangedDelegate(this.ClickDailyDungeonReset));
    }
コード例 #5
0
    public void SetData()
    {
        if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null)
        {
            this.Close();
            return;
        }
        string empty = string.Empty;
        bool   flag  = false;
        sbyte  b     = (sbyte)NrTSingleton <DailyDungeonManager> .Instance.GetCurrWeekofDay();

        long num        = this.MaxResetCount();
        long resetCount = NrTSingleton <DailyDungeonManager> .Instance.GetResetCount();

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3441"),
            "count1",
            resetCount.ToString(),
            "count2",
            num.ToString()
        });

        this.m_lbLimitCount.Text = empty;
        for (int i = 0; i < 5; i++)
        {
            EVENT_DAILY_DUNGEON_INFO dailyDungeonInfo = EVENT_DAILY_DUNGEON_DATA.GetInstance().GetDailyDungeonInfo(1, (sbyte)(i + 1));
            if ((int)b == 0 || (int)b == 6)
            {
                int num2 = this.DailyDungeonClearCheck((sbyte)(i + 1));
                flag = this.DailyDungeonRewardCheck((sbyte)(i + 1));
                if (flag)
                {
                    this.m_btStage[i].controlIsEnabled = false;
                    this.m_btStage[i].Click            = null;
                    this.m_dtSatge[i].enabled          = true;
                    this.m_dtSatge[i].SetTextureFromBundle("UI/" + dailyDungeonInfo.szClose);
                    this.m_dtSatge_Lock1[i].Visible = true;
                    this.m_dtSatge_Lock2[i].Visible = true;
                    this.m_btStage_Reset[i].Visible = true;
                    this.m_btStage_Reset[i].Data    = (sbyte)(i + 1);
                    Button expr_176 = this.m_btStage_Reset[i];
                    expr_176.Click = (EZValueChangedDelegate)Delegate.Combine(expr_176.Click, new EZValueChangedDelegate(this.ClickDailyDungeonReset));
                }
                else
                {
                    this.m_btStage[i].controlIsEnabled = true;
                    this.m_btStage[i].Data             = (sbyte)(i + 1);
                    this.m_btStage[i].Click            = new EZValueChangedDelegate(this.ClickDailyDungeonOpen);
                    this.m_dtSatge[i].SetTextureFromBundle("UI/" + dailyDungeonInfo.szOpen);
                    this.m_dtSatge_Lock1[i].Visible = false;
                    this.m_dtSatge_Lock2[i].Visible = false;
                    this.m_btStage_Reset[i].Visible = false;
                    this.m_btStage_Reset[i].Data    = (sbyte)(i + 1);
                    this.m_btStage_Reset[i].Click   = null;
                }
                if (num2 != 0 && num2 != i + 1)
                {
                    this.m_btStage[i].controlIsEnabled = false;
                    this.m_btStage[i].Click            = null;
                    this.m_dtSatge[i].enabled          = true;
                    this.m_dtSatge[i].SetTextureFromBundle("UI/" + dailyDungeonInfo.szClose);
                    this.m_dtSatge_Lock1[i].Visible = false;
                    this.m_dtSatge_Lock2[i].Visible = false;
                    this.m_btStage_Reset[i].Visible = false;
                }
            }
            else if ((int)b == (int)((sbyte)i) + 1)
            {
                flag = this.DailyDungeonRewardCheck((sbyte)(i + 1));
                if (flag)
                {
                    this.m_btStage[i].controlIsEnabled = false;
                    this.m_dtSatge[i].enabled          = true;
                    this.m_dtSatge[i].SetTextureFromBundle("UI/" + dailyDungeonInfo.szClose);
                    this.m_dtSatge_Lock1[i].Visible = true;
                    this.m_dtSatge_Lock2[i].Visible = true;
                    this.m_btStage_Reset[i].Visible = true;
                    this.m_btStage_Reset[i].Data    = (sbyte)(i + 1);
                    this.m_btStage_Reset[i].Click   = new EZValueChangedDelegate(this.ClickDailyDungeonReset);
                }
                else
                {
                    this.m_btStage[i].controlIsEnabled = true;
                    this.m_btStage[i].Data             = (sbyte)(i + 1);
                    this.m_btStage[i].Click            = new EZValueChangedDelegate(this.ClickDailyDungeonOpen);
                    this.m_dtSatge[i].enabled          = false;
                    this.m_dtSatge[i].SetTextureFromBundle("UI/" + dailyDungeonInfo.szOpen);
                    this.m_dtSatge_Lock1[i].Visible = false;
                    this.m_dtSatge_Lock2[i].Visible = false;
                    this.m_btStage_Reset[i].Visible = false;
                    this.m_btStage_Reset[i].Data    = (sbyte)(i + 1);
                }
            }
            else
            {
                this.m_btStage[i].controlIsEnabled = false;
                this.m_dtSatge[i].enabled          = true;
                this.m_dtSatge[i].SetTextureFromBundle("UI/" + dailyDungeonInfo.szClose);
                this.m_dtSatge_Lock1[i].Visible = false;
                this.m_dtSatge_Lock2[i].Visible = false;
                this.m_btStage_Reset[i].Visible = false;
                this.m_btStage_Reset[i].Data    = (sbyte)(i + 1);
                this.m_btStage_Reset[i].Click   = null;
            }
            this.m_itRewardItem[i].SetItemTexture(dailyDungeonInfo.i32RewardItemUnique);
            this.m_lbRewardItemName[i].SetText(NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(dailyDungeonInfo.i32RewardItemUnique));
            if (resetCount >= num && flag)
            {
                this.m_btStage[i].controlIsEnabled = false;
                this.m_dtSatge_Lock1[i].Visible    = false;
                this.m_dtSatge_Lock2[i].Visible    = false;
                this.m_btStage_Reset[i].Visible    = false;
            }
        }
    }