Esempio n. 1
0
    public override void Update()
    {
        if (Time.time >= this.sendtime)
        {
            this.sendtime += 10f;
            NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

            if (@char != null)
            {
                GS_SERVER_CHARINFO_REQ gS_SERVER_CHARINFO_REQ = new GS_SERVER_CHARINFO_REQ();
                gS_SERVER_CHARINFO_REQ.siCharUnique = @char.GetCharUnique();
                gS_SERVER_CHARINFO_REQ.bTimeOnly    = true;
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_SERVER_CHARINFO_REQ, gS_SERVER_CHARINFO_REQ);
            }
        }
        int rewardNoticeCount = NrTSingleton <ChallengeManager> .Instance.GetRewardNoticeCount();

        if (0 < rewardNoticeCount)
        {
            if (this.count != rewardNoticeCount)
            {
                int num = rewardNoticeCount;
                this.challengeNotice.Visible = true;
                this.challengeNotice.Text    = num.ToString();
                this.count = num;
            }
        }
        else if (this.challengeNotice.Visible)
        {
            this.challengeNotice.Visible = false;
        }
    }
Esempio n. 2
0
    public override void Update()
    {
        base.Update();
        this.frames += 1f;
        float realtimeSinceStartup = Time.realtimeSinceStartup;

        if ((double)realtimeSinceStartup > this.lastInterval + (double)this.updateInterval)
        {
            this.fps          = (float)((double)this.frames / ((double)realtimeSinceStartup - this.lastInterval));
            this.frames       = 0f;
            this.lastInterval = (double)realtimeSinceStartup;
        }
        if (Battle.BATTLE == null)
        {
            string text = string.Format("PING : {0}ms GS : {1} WS : {2}", this.m_fFpsSec * 1000f, this.m_dwGSTick, this.m_dwWSTick);
            this.m_lbPing.Text = text;
        }
        else
        {
            string text2 = string.Format("PING : {0}ms GS : {1} WS : {2} Order : {3} CInfo : {4}", new object[]
            {
                this.m_fFpsSec * 1000f,
                this.m_dwGSTick,
                this.m_dwWSTick,
                Battle.BATTLE.m_fOrderPing,
                Battle.BATTLE.m_fInfoPing
            });
            this.m_lbPing.Text = text2;
        }
        this.m_lbFPS.Text = "FPS: " + this.fps.ToString("f2");
        if (this.m_UserObject != null)
        {
            this.m_lbSoldierPos.Text = this.m_UserObject.transform.position.ToString() + " _ANGLES:" + this.m_UserObject.transform.localEulerAngles.y.ToString();
        }
        else
        {
            this.m_lbSoldierPos.Text = string.Empty;
        }
        float num = (float)NrTSingleton <NrGlobalReference> .Instance.GetDownloadInfo().m_si32TotalSizeDownloaded;

        num /= 1048576f;
        float num2 = (float)NrTSingleton <NrGlobalReference> .Instance.GetDownloadInfo().m_si32SceneSizeDownloaded;

        num2 /= 1048576f;
        this.m_lbTotal.Text = "TotalDownloadSize : " + num.ToString("N2") + "MB";
        string text3 = string.Format("SceneDownloadSize : {0}MB", num2.ToString("N2"));

        text3 = string.Format("{0}\nAppMemory : {1}MB", text3, NrTSingleton <NrMainSystem> .Instance.CurAppMemory);
        this.m_lbScene.Text     = text3;
        this.m_lbTotalTime.Text = "Total Play Time = " + PublicMethod.ConvertTime(this.TotalTime);
        this.m_lbRealTime.Text  = "Real Play Time = " + PublicMethod.ConvertTime(this.RealTime);
        this.m_lbMonster.Text   = "Monster : " + this.Monster.ToString();
        this.m_lbNPC.Text       = "NPC: " + this.NPC.ToString();
        this.m_lbUser.Text      = "User: "******"MaxUser : "******"CurUser: "******"Using Net Time = " + PublicMethod.ConvertTime(time) + " sec";
        long num3 = SendPacket.GetInstance().GetTotalSendPacketSize();

        num3 += BaseNet_Game.GetInstance().GetTotalReceivePacketSize();
        this.m_lbUseNetSize.Text = "Using Net Size = " + string.Format("{0:###,###,###,##0}", num3) + " bytes";
        if (Time.time >= this.sendtime)
        {
            this.sendtime += 1f;
            if (NrTSingleton <NkClientLogic> .Instance.IsWorldScene())
            {
                NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                if (@char != null)
                {
                    GS_SERVER_CHARINFO_REQ gS_SERVER_CHARINFO_REQ = new GS_SERVER_CHARINFO_REQ();
                    gS_SERVER_CHARINFO_REQ.siCharUnique = @char.GetCharUnique();
                    gS_SERVER_CHARINFO_REQ.bTimeOnly    = false;
                    SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_SERVER_CHARINFO_REQ, gS_SERVER_CHARINFO_REQ);
                }
            }
        }
    }
Esempio n. 3
0
    public override void SetComponent()
    {
        this.m_btnKaKao           = (base.GetControl("Button_Kakao") as Button);
        this.m_btnKaKao.EffectAni = false;
        this.m_btnKaKao.SetValueChangedDelegate(new EZValueChangedDelegate(this.Exit));
        this.m_btnConvert = (base.GetControl("BT_AccountLink") as Button);
        this.m_btnConvert.SetValueChangedDelegate(new EZValueChangedDelegate(this.ConverPlatformID));
        this.m_btnKaKao.Visible   = false;
        this.m_btnConvert.Visible = false;
        for (int i = 0; i < 14; i++)
        {
            this.m_BtnGameInfo[i] = (base.GetControl(NrTSingleton <UIDataManager> .Instance.GetString("Button_MenuBTN", (i + 1).ToString("00"))) as Button);
            this.m_dwButtonImg[i] = (base.GetControl(NrTSingleton <UIDataManager> .Instance.GetString("DrawTexture_BTN_IMG_", (i + 1).ToString("00"))) as DrawTexture);
            this.m_lbMenuName[i]  = (base.GetControl(NrTSingleton <UIDataManager> .Instance.GetString("Label_BTN_Label_", (i + 1).ToString("00"))) as Label);
            this.m_dwBGImg[i]     = (base.GetControl(NrTSingleton <UIDataManager> .Instance.GetString("DrawTexture_", (i + 1).ToString("00"))) as DrawTexture);
        }
        this.ShowHideButton();
        this.m_BtnGameInfo[12]      = (base.GetControl("BT_GoFaceBook") as Button);
        this.m_BtnGameInfo[12].data = 12;
        this.m_BtnGameInfo[12].AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickButton));
        if (TsPlatform.IsBand || NrTSingleton <ContentsLimitManager> .Instance.IsFacebookLimit())
        {
            this.m_lbFacebook = (base.GetControl("LB_FaceBook") as Label);
            this.m_dwFacebook = (base.GetControl("DT_FaceBook") as DrawTexture);
            this.m_BtnGameInfo[12].Visible = false;
            this.m_lbFacebook.Visible      = false;
            this.m_dwFacebook.Visible      = false;
        }
        if (this.m_lbFacebook == null)
        {
            this.m_lbFacebook = (base.GetControl("LB_FaceBook") as Label);
        }
        if (this.m_dwFacebook == null)
        {
            this.m_dwFacebook = (base.GetControl("DT_FaceBook") as DrawTexture);
        }
        this.m_BtnGameInfo[12].Visible = true;
        this.m_lbFacebook.Visible      = true;
        this.m_dwFacebook.Visible      = true;
        this.m_BtnGameInfo[13]         = (base.GetControl("BT_GoGafe") as Button);
        this.m_BtnGameInfo[13].data    = 13;
        this.m_BtnGameInfo[13].AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickButton));
        this.m_dtCharImg  = (base.GetControl("DT_CharImg") as DrawTexture);
        this.m_lbCharName = (base.GetControl("LB_CharName") as Label);
        this.m_lbRealTime = (base.GetControl("Label_realtime01") as Label);
        this.m_lbRealTime.SetText(string.Empty);
        this.m_lbPlayTime = (base.GetControl("Label_playtime") as Label);
        this.m_lbPlayTime.SetText(string.Empty);
        this.m_taIntroMsg                  = (base.GetControl("TextArea_Greeting") as TextArea);
        this.m_taIntroMsg.maxLength        = 40;
        this.m_taIntroMsg.controlIsEnabled = false;
        this.m_BtnChangeIntroMsg           = (base.GetControl("BT_ChangeGreeting") as Button);
        this.m_BtnChangeIntroMsg.AddValueChangedDelegate(new EZValueChangedDelegate(this.ChangeIntroMsg));
        this.challengeNotice         = (base.GetControl("Box_Notice") as Box);
        this.challengeNotice.Visible = false;
        this.m_dtCoupon = (base.GetControl("DT_Coupon") as DrawTexture);
        this.m_btCoupon = (base.GetControl("BT_GoCoupon") as Button);
        this.m_btCoupon.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickCoupon));
        this.m_bxAuction = (base.GetControl("Box_Auction") as Box);
        this.m_bxAuction.Hide(true);
        this.m_bxCustomerNotice = (base.GetControl("Box_Notice_Customer") as Box);
        this.m_bxCustomerNotice.Hide(true);
        this.m_btGoCustomer = (base.GetControl("BT_GoCustomer") as Button);
        this.m_btGoCustomer.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickGoCustomer));
        this.m_btnSDK[1] = (base.GetControl("BT_MoreGame_Chn") as Button);
        this.m_btnSDK[1].Hide(true);
        this.m_btnSDK[0] = (base.GetControl("BT_About_Chn") as Button);
        this.m_btnSDK[0].Hide(true);
        this.m_btnSDK[2] = (base.GetControl("BT_Exit_Chn") as Button);
        this.m_btnSDK[2].Hide(true);
        if (NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1) == null)
        {
            return;
        }
        this.mapFun.Add(MainMenuDlg.TYPE.NOTICE, new FunDelegate(this.Notice));
        this.mapFun.Add(MainMenuDlg.TYPE.SOLCOMBINATION, new FunDelegate(this.SolCombination));
        this.mapFun.Add(MainMenuDlg.TYPE.ITEMUPGRADE, new FunDelegate(this.ItemUpgrade));
        this.mapFun.Add(MainMenuDlg.TYPE.POST, new FunDelegate(this.Post));
        this.mapFun.Add(MainMenuDlg.TYPE.CHANNELMOVE, new FunDelegate(this.ChannelMove));
        this.mapFun.Add(MainMenuDlg.TYPE.SYSTEM, new FunDelegate(this.System));
        this.mapFun.Add(MainMenuDlg.TYPE.EXIT, new FunDelegate(this.Exit));
        this.mapFun.Add(MainMenuDlg.TYPE.FACEBOOK, new FunDelegate(this.GoFaceBook));
        this.mapFun.Add(MainMenuDlg.TYPE.MAINCAFE, new FunDelegate(this.GoMainCafe));
        this.mapFun.Add(MainMenuDlg.TYPE.CHALLENGE, new FunDelegate(this.Challenge));
        this.mapFun.Add(MainMenuDlg.TYPE.ITEMSHOP, new FunDelegate(this.ItemShop));
        this.mapFun.Add(MainMenuDlg.TYPE.NPCAUTOMOVE, new FunDelegate(this.NPCAutoMove));
        this.mapFun.Add(MainMenuDlg.TYPE.AUCTION, new FunDelegate(this.Auction));
        this.mapFun.Add(MainMenuDlg.TYPE.MINIALBUM, new FunDelegate(this.MiniAlbum));
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        GS_SERVER_CHARINFO_REQ gS_SERVER_CHARINFO_REQ = new GS_SERVER_CHARINFO_REQ();

        gS_SERVER_CHARINFO_REQ.siCharUnique = @char.GetCharUnique();
        gS_SERVER_CHARINFO_REQ.bTimeOnly    = true;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_SERVER_CHARINFO_REQ, gS_SERVER_CHARINFO_REQ);
        TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "MAINMENU", "OPEN", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
        base.SetScreenCenter();
        this.CheckCouponUse();
    }