Пример #1
0
    public void SetSubFloorClear(short sub_floor, short floortype = 1)
    {
        this.m_dtMainBg.SetTextureFromBundle("UI/BabelTower/Babel_sub" + sub_floor.ToString());
        NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_BABEL_SUB", this.m_dtMainBg, this.m_dtMainBg.GetSize());

        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        for (short num = 0; num < 5; num += 1)
        {
            string texture = string.Empty;
            if (this.m_dtFloorHundredNum[(int)sub_floor][(int)num] != null && this.m_nFloor >= 100)
            {
                short num2 = this.m_nFloor / 100;
                if (num2 > 0)
                {
                    texture = "Win_Number_" + num2;
                    this.m_dtFloorHundredNum[(int)sub_floor][(int)num].Hide(false);
                    this.m_dtFloorHundredNum[(int)sub_floor][(int)num].SetTexture(texture);
                }
            }
            if (this.m_dtFloorFirstNum[(int)sub_floor][(int)num] != null)
            {
                short num3 = this.m_nFloor / 10;
                if (num3 >= 10)
                {
                    num3 %= 10;
                }
                if (num3 > 0 || (num3 == 0 && this.m_nFloor >= 100))
                {
                    texture = "Win_Number_" + num3;
                    this.m_dtFloorFirstNum[(int)sub_floor][(int)num].Hide(false);
                    this.m_dtFloorFirstNum[(int)sub_floor][(int)num].SetTexture(texture);
                }
            }
            if (this.m_dtFloorSecondNum[(int)sub_floor][(int)num] != null)
            {
                short num4 = this.m_nFloor % 10;
                texture = "Win_Number_" + num4;
                this.m_dtFloorSecondNum[(int)sub_floor][(int)num].Hide(false);
                this.m_dtFloorSecondNum[(int)sub_floor][(int)num].SetTexture(texture);
            }
        }
        for (short num5 = 0; num5 < 5; num5 += 1)
        {
            byte babelSubFloorRankInfo = kMyCharInfo.GetBabelSubFloorRankInfo(this.m_nFloor, (byte)num5, floortype);
            bool treasure = kMyCharInfo.IsBabelTreasure(this.m_nFloor, (short)((byte)num5), floortype);
            if (this.m_btSubFloor[(int)sub_floor][(int)num5] != null)
            {
                this.m_btSubFloor[(int)sub_floor][(int)num5].SetButtonTextureKey(NrTSingleton <BabelTowerManager> .Instance.GetBabelRankImgText(babelSubFloorRankInfo, treasure));
            }
        }
    }
    public void OnBtnHardMode(IUIObject obj)
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo.GetBabelSubFloorRankInfo(100, 4, 1) > 0)
        {
            this.DirctionUI(2);
        }
        else
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("777"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
        }
    }
Пример #3
0
    public override void SetComponent()
    {
        this.m_dtEffect            = (base.GetControl("DrawTexture_Effect") as DrawTexture);
        this.m_lbFloor             = (base.GetControl("NewListBox_floor") as NewListBox);
        this.m_lbFloor.SelectStyle = "Com_B_Transparent";
        this.m_lbFloor.AddRightMouseDelegate(new EZValueChangedDelegate(this.BtClickFloor));
        this.m_lbFloor.AddScrollDelegate(new EZScrollDelegate(this.ChangeFloorInfo));
        this.m_lbFloor.AddMakeCompleteDelegate(new EZValueChangedDelegate(this.ScrollFloor));
        this.m_lbFloor.Reserve    = false;
        this.m_lbFloor.AutoScroll = true;
        this.m_btOpenRoomList     = (base.GetControl("Button_roomlist") as Button);
        this.m_btOpenRoomList.AddValueChangedDelegate(new EZValueChangedDelegate(this.BtClickOpenRoomList));
        this.upButton      = (base.GetControl("Button_slideup") as Button);
        this.downButton    = (base.GetControl("Button_slidedown") as Button);
        this.m_btInventory = (base.GetControl("BT_Inventory") as Button);
        this.m_btInventory.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickInventoyOpen));
        BoxCollider boxCollider = (BoxCollider)this.upButton.gameObject.GetComponent(typeof(BoxCollider));

        if (boxCollider != null)
        {
            boxCollider.size = new Vector3(0f, 0f, 0f);
        }
        boxCollider = (BoxCollider)this.downButton.gameObject.GetComponent(typeof(BoxCollider));
        if (boxCollider != null)
        {
            boxCollider.size = new Vector3(0f, 0f, 0f);
        }
        this.up   = (base.GetControl("DrawTexture_SlideBG01") as DrawTexture);
        this.down = (base.GetControl("DrawTexture_SlideBG02") as DrawTexture);
        this.downButton.SetLocation(this.downButton.GetLocation().x, this.down.GetLocationY() + 36f, this.downButton.GetLocation().z - 1.1f);
        this.upButton.Visible = false;
        this.up.Visible       = false;
        this.m_btClose        = (base.GetControl("Button_close") as Button);
        this.m_btClose.AddValueChangedDelegate(new EZValueChangedDelegate(this.BtClickClose));
        this.m_btGuildBoss = (base.GetControl("Button_GuildBoss") as Button);
        Button expr_282 = this.m_btGuildBoss;

        expr_282.Click  = (EZValueChangedDelegate)Delegate.Combine(expr_282.Click, new EZValueChangedDelegate(this.OnClickGuildBoss));
        this.m_btRepeat = (base.GetControl("Button_Repeat") as Button);
        Button expr_2BF = this.m_btRepeat;

        expr_2BF.Click   = (EZValueChangedDelegate)Delegate.Combine(expr_2BF.Click, new EZValueChangedDelegate(this.OnClickRepeat));
        this.m_laSolInfo = (base.GetControl("Label_soldierinfo") as Label);
        this.m_laSolInfo.SetLocation(this.m_laSolInfo.GetLocationX(), this.m_laSolInfo.GetLocationY(), this.m_laSolInfo.GetLocation().z - 1.7f);
        this.m_btSolInfo = (base.GetControl("Button_soldierinfo") as Button);
        Button expr_34D = this.m_btSolInfo;

        expr_34D.Click        = (EZValueChangedDelegate)Delegate.Combine(expr_34D.Click, new EZValueChangedDelegate(this.OnClickSolInfo));
        this.m_bGuildBoosicon = (base.GetControl("Box_Notice") as Box);
        this.m_bGuildBoosicon.Hide(true);
        this.m_dtLock         = (base.GetControl("DT_Lock") as DrawTexture);
        this.m_dtLock.Visible = false;
        if (!NrTSingleton <ContentsLimitManager> .Instance.IsGuildBoss())
        {
            this.m_bGuildBoosicon.Visible = false;
            this.m_btGuildBoss.Visible    = false;
        }
        else
        {
            this.m_bGuildBoosicon.Visible = true;
            this.m_btGuildBoss.Visible    = true;
        }
        this.m_laTitle        = (base.GetControl("Label_title") as Label);
        this.m_dwTitleBar     = (base.GetControl("DrawTexture_TitleBar") as DrawTexture);
        this.m_btReSelectMode = (base.GetControl("Button_Back") as Button);
        this.m_btReSelectMode.AddValueChangedDelegate(new EZValueChangedDelegate(this.ReSelectMode));
        this.m_btReSelectMode.Visible = false;
        this.GuildBossCheck();
        base.SetScreenCenter();
        UIDataManager.MuteSound(true);
        NrTSingleton <FiveRocksEventManager> .Instance.Placement("babeltower_enter");

        base.SetLayerZ(1, -1f);
        base.SetLayerZ(2, -1.2f);
        base.SetLayerZ(3, -1.4f);
        base.SetLayerZ(4, -1.6f);
        this.closeButton.SetLocationZ(this.m_dwTitleBar.GetLocation().z - 0.01f);
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return;
        }
        int value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BABEL_HARD_LEVEL);
        int level = kMyCharInfo.GetLevel();

        if (level > value && kMyCharInfo.GetBabelSubFloorRankInfo(100, 4, 1) > 0)
        {
            this.m_btReSelectMode.Visible = true;
        }
        NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.GUILDCOLLECT_DLG);
    }