コード例 #1
0
 /// <summary>
 /// 更新玩家信息
 /// </summary>
 public void RefreshPlayerInfo()
 {
     if (yr != null && yr.ContainsKey("PlayerName"))
     {
         lblPlayerName.text  = yr["PlayerName"].YuanColumnText.Trim();
         lblPlayerLevel.text = yr["PlayerLevel"].YuanColumnText.Trim();
         lblPlayerPro.text   = RefreshList.GetPro(yr["ProID"].YuanColumnText.Trim());
         lblPrestige.text    = yr["Prestige"].YuanColumnText.Trim();
         lblRanking.text     = yr["VSRanking"].YuanColumnText.Trim();
         if (yr["GuildName"].YuanColumnText.Trim() == "")
         {
             lblGuild.text = StaticLoc.Loc.Get("info689");
         }
         else
         {
             lblGuild.text = yr["GuildName"].YuanColumnText.Trim();
         }
         yrLoaction       = YuanUnityPhoton.GetYuanUnityPhotonInstantiate().ytMapLevel.SelectRowEqual("MapID", yr["Place"].YuanColumnText.Trim());
         lblLocation.text = yrLoaction["MapName"].YuanColumnText.Trim();
         if (btnTalk != null)
         {
             btnTalk.playerID = yr["PlayerID"].YuanColumnText.Trim();
         }
     }
 }
コード例 #2
0
    public void SetPVP1List(yuan.YuanMemoryDB.YuanTable mYt)
    {
        for (int i = 0; i < listPVP1.Count; i++)
        {
            listPVP1[i].gameObject.SetActiveRecursively(false);
        }
        for (int i = 0; i < mYt.Rows.Count; i++)
        {
            if (listPVP1.Count > i)
            {
                listPVP1[i].playerID           = mYt.Rows[i]["PlayerID"].YuanColumnText;
                listPVP1[i].lblPlayerName.text = mYt.Rows[i]["PlayerName"].YuanColumnText;

                listPVP1[i].lblPlayerLevel.text  = "Lv" + mYt.Rows[i]["PlayerLevel"].YuanColumnText;
                listPVP1[i].picPlayer.atlas      = PanelStatic.StaticYuanPicManger.picPlayer[int.Parse(mYt.Rows[i]["ProID"].YuanColumnText) - 1].atlas;
                listPVP1[i].picPlayer.spriteName = PanelStatic.StaticYuanPicManger.picPlayer[int.Parse(mYt.Rows[i]["ProID"].YuanColumnText) - 1].spriteName;
                listPVP1[i].btnAddLable.text     = StaticLoc.Loc.Get("info338") + "";
                listPVP1[i].lblPlayerPro.text    = RefreshList.GetPro(mYt.Rows[i]["ProID"].YuanColumnText);

                if (myGrid.gameObject.active)
                {
                    listPVP1[i].gameObject.SetActiveRecursively(true);
                    listPVP1[i].picNew.gameObject.active = false;
                }
            }
            else
            {
                BtnPlayerForTeam tempPlayer = (BtnPlayerForTeam)Instantiate(btnPlayerForOnePVP);
                tempPlayer.GetComponent <UIToggle>().group = 7;
                tempPlayer.transform.parent           = myGrid.transform;
                tempPlayer.transform.localPosition    = Vector3.zero;
                tempPlayer.transform.localScale       = new Vector3(1, 1, 1);
                tempPlayer.btnAddMessage.target       = this.gameObject;
                tempPlayer.btnAddMessage.functionName = "BtnPVP1";
                tempPlayer.btnAddLable.text           = StaticLoc.Loc.Get("info338") + "";
                tempPlayer.lblPlayerPro.text          = RefreshList.GetPro(mYt.Rows[i]["ProID"].YuanColumnText);
                tempPlayer.picNew.gameObject.active   = false;

                tempPlayer.playerID = mYt.Rows[i]["PlayerID"].YuanColumnText;
                if (mYt.Rows[i]["PlayerID"].YuanColumnText == "-10")
                {
                    PanelStatic.StaticBtnGameManager.pvpButtonTran = tempPlayer.btnAddMessage.gameObject.transform;
                    PanelStatic.StaticBtnGameManagerBack.UICL.SendMessage("SetCourseStepObject", tempPlayer.btnAddMessage.gameObject.transform, SendMessageOptions.DontRequireReceiver);
                    tempPlayer.picNew.gameObject.active   = false;
                    tempPlayer.btnAddMessage.functionName = "RobotytShaDow";
                }
                tempPlayer.lblPlayerName.text = mYt.Rows[i]["PlayerName"].YuanColumnText;

                tempPlayer.picPlayer.atlas      = PanelStatic.StaticYuanPicManger.picPlayer[int.Parse(mYt.Rows[i]["ProID"].YuanColumnText) - 1].atlas;
                tempPlayer.picPlayer.spriteName = PanelStatic.StaticYuanPicManger.picPlayer[int.Parse(mYt.Rows[i]["ProID"].YuanColumnText) - 1].spriteName;
                tempPlayer.lblPlayerLevel.text  = "Lv" + mYt.Rows[i]["PlayerLevel"].YuanColumnText;
                listPVP1.Add(tempPlayer);
                if (!myGrid.gameObject.active)
                {
                    tempPlayer.gameObject.SetActiveRecursively(false);
                }
            }
            myGrid.repositionNow = true;
        }
    }
コード例 #3
0
 public void RefreshPlayerInfo()
 {
     if (yr != null)
     {
         lblName.text    = yr["PlayerName"].YuanColumnText.Trim();
         lblLevel.text   = yr["PlayerLevel"].YuanColumnText.Trim();
         lblPro.text     = RefreshList.GetPro(yr["ProID"].YuanColumnText.Trim());
         lblRanking.text = yr["VSRanking"].YuanColumnText.Trim();
         int numPro = int.Parse(yr["ProID"].YuanColumnText.Trim());
         picHead.atlas      = yuanPicManager.picPlayer[numPro - 1].atlas;
         picHead.spriteName = yuanPicManager.picPlayer[numPro - 1].spriteName;
     }
 }
コード例 #4
0
    public void SetPVP1RevengeList(yuan.YuanMemoryDB.YuanTable mYt)
    {
        for (int i = 0; i < listPVP1.Count; i++)
        {
            listPVP1[i].gameObject.SetActiveRecursively(false);
        }
        for (int i = 0; i < mYt.Rows.Count; i++)
        {
            if (listPVP1.Count > i)
            {
                listPVP1[i].playerID           = mYt.Rows[i]["PlayerID"].YuanColumnText;
                listPVP1[i].lblPlayerName.text = mYt.Rows[i]["PlayerName"].YuanColumnText;
                listPVP1[i].yr = mYt.Rows[i];
                listPVP1[i].lblPlayerLevel.text  = "Lv" + mYt.Rows[i]["PlayerLevel"].YuanColumnText;
                listPVP1[i].picPlayer.atlas      = PanelStatic.StaticYuanPicManger.picPlayer[int.Parse(mYt.Rows[i]["ProID"].YuanColumnText) - 1].atlas;
                listPVP1[i].picPlayer.spriteName = PanelStatic.StaticYuanPicManger.picPlayer[int.Parse(mYt.Rows[i]["ProID"].YuanColumnText) - 1].spriteName;

                string[] bePVPInfo = mYt.Rows[i]["pvp1BeInfo"].YuanColumnText.Split(',');


                if (bePVPInfo[1].Trim() == "0")
                {
                    listPVP1[i].lblPlayerPro.text = string.Format("{0}[00ff00]{1}", System.DateTime.Parse(bePVPInfo[3]).ToShortTimeString(), StaticLoc.Loc.Get("info339"));
                }
                else
                {
                    listPVP1[i].lblPlayerPro.text = string.Format("{0}[ff0000]{1}", System.DateTime.Parse(bePVPInfo[3]).ToShortTimeString(), StaticLoc.Loc.Get("info339"));
                }


                //listPVP1[i].lblPlayerPro.text = RefreshList.GetPro(mYt.Rows[i]["ProID"].YuanColumnText);

                if (myGrid.gameObject.active)
                {
                    listPVP1[i].gameObject.SetActiveRecursively(true);
                    if (bePVPInfo[2].Trim() == "2")
                    {
                        listPVP1[i].btnAddLable.text         = StaticLoc.Loc.Get("info341");
                        listPVP1[i].picNew.gameObject.active = false;
                    }
                    else
                    {
                        listPVP1[i].btnAddLable.text         = StaticLoc.Loc.Get("info342");
                        listPVP1[i].picNew.gameObject.active = true;
                    }
                }
                else
                {
                    listPVP1[i].gameObject.SetActiveRecursively(false);
                }
            }
            else
            {
                BtnPlayerForTeam tempPlayer = (BtnPlayerForTeam)Instantiate(btnPlayerForOnePVP);
                tempPlayer.GetComponent <UIToggle>().group = 7;
                tempPlayer.transform.parent           = myGrid.transform;
                tempPlayer.transform.localPosition    = Vector3.zero;
                tempPlayer.transform.localScale       = new Vector3(1, 1, 1);
                tempPlayer.btnAddMessage.target       = this.gameObject;
                tempPlayer.btnAddMessage.functionName = "BtnPVP1";
                tempPlayer.btnAddLable.text           = StaticLoc.Loc.Get("info338");
                tempPlayer.lblPlayerPro.text          = RefreshList.GetPro(mYt.Rows[i]["ProID"].YuanColumnText);
                tempPlayer.playerID             = mYt.Rows[i]["PlayerID"].YuanColumnText;
                tempPlayer.lblPlayerName.text   = mYt.Rows[i]["PlayerName"].YuanColumnText;
                tempPlayer.picPlayer.atlas      = PanelStatic.StaticYuanPicManger.picPlayer[int.Parse(mYt.Rows[i]["ProID"].YuanColumnText) - 1].atlas;
                tempPlayer.picPlayer.spriteName = PanelStatic.StaticYuanPicManger.picPlayer[int.Parse(mYt.Rows[i]["ProID"].YuanColumnText) - 1].spriteName;
                tempPlayer.lblPlayerLevel.text  = "Lv" + mYt.Rows[i]["PlayerLevel"].YuanColumnText;
                tempPlayer.yr = mYt.Rows[i];

                string[] bePVPInfo = mYt.Rows[i]["pvp1BeInfo"].YuanColumnText.Split(',');
                if (bePVPInfo[2].Trim() == "2")
                {
                    tempPlayer.btnAddLable.text         = StaticLoc.Loc.Get("info343");
                    tempPlayer.picNew.gameObject.active = false;
                }
                else
                {
                    tempPlayer.btnAddLable.text         = StaticLoc.Loc.Get("info342");
                    tempPlayer.picNew.gameObject.active = true;
                }

                if (bePVPInfo[1].Trim() == "0")
                {
                    tempPlayer.lblPlayerPro.text = string.Format("{0}[00ff00]{1}", System.DateTime.Parse(bePVPInfo[3]).ToShortTimeString(), StaticLoc.Loc.Get("info339"));
                }
                else
                {
                    tempPlayer.lblPlayerPro.text = string.Format("{0}[ff0000]{1}", System.DateTime.Parse(bePVPInfo[3]).ToShortTimeString(), StaticLoc.Loc.Get("info340"));
                }


                listPVP1.Add(tempPlayer);
                if (!myGrid.gameObject.active)
                {
                    tempPlayer.gameObject.SetActiveRecursively(false);
                }
            }
            myGrid.repositionNow = true;
        }
    }
コード例 #5
0
    private IEnumerator ReadInfo()
    {
        switch (pvpType)
        {
        case PVPType.Colosseum:
            lblNull2.gameObject.active  = false;
            lblNull4.gameObject.active  = false;
            lblCPlayerChallengeNum.text = (10 - int.Parse(BtnGameManager.yt.Rows[0]["PVPTimes"].YuanColumnText)).ToString();
            lblCPlayerLevel.text        = InRoom.isUpdatePlayerLevel?InRoom.playerLevel: BtnGameManager.yt.Rows[0]["PlayerLevel"].YuanColumnText;
            lblCPlayerName.text         = BtnGameManager.yt.Rows[0]["PlayerName"].YuanColumnText;
            lblCPlayerPower.text        = BtnGameManager.yt.Rows[0]["ColosseumFighting"].YuanColumnText;
            lblCPlayerPro.text          = RefreshList.GetPro(BtnGameManager.yt.Rows[0]["ProID"].YuanColumnText);
            //lblCPlayerRanking.text = BtnGameManager.yt.Rows[0]["Rank"].YuanColumnText;
            lblCPlayerTitle.text = BtnGameManager.yt.Rows[0]["SelectTitle"].YuanColumnText;
            picCHead.atlas       = yuanPicManager.picPlayer[BtnGameManager.yt.Rows[0]["ProID"].YuanColumnText.Parse(0) - 1].atlas;
            picCHead.spriteName  = yuanPicManager.picPlayer[BtnGameManager.yt.Rows[0]["ProID"].YuanColumnText.Parse(0) - 1].spriteName;
            if (BtnGameManagerBack.isInPVPOne)
            {
                if (lblInPVP != null)
                {
                    lblInPVP.gameObject.SetActiveRecursively(true);
                }
            }
            else
            {
                if (lblInPVP != null)
                {
                    lblInPVP.gameObject.SetActiveRecursively(false);
                }
            }
            SetNoteString("PVP1Info", lblCPlayerNote);
            lblCPlayerRanking.text = PVPRankNum.ToString();
            //sqlMy=string.Format ("Select (Select count(*) from {3} where a.{0}<{0} or (a.{0}={0} and a.PlayerID<PlayerID)) as ROW_NUMBER,a.{0},a.{1},a.PlayerID from {3} a where PlayerID={2} order by ROW_NUMBER", "ColosseumPoint", "PlayerName", BtnGameManager.yt.Rows[0]["PlayerID"].YuanColumnText, "PlayerInfo");
            //InRoom.GetInRoomInstantiate().GetYuanTable(sqlMy, "DarkSword2", ytRanking);
            InRoom.GetInRoomInstantiate().GetRankOne(yuan.YuanPhoton.RankingType.Abattoir, BtnGameManager.yt.Rows[0]["PlayerID"].YuanColumnText, ytRanking);
            while (ytRanking.IsUpdate)
            {
                yield return(new WaitForSeconds(0.1f));
            }
//				lblCPlayerRanking.text = ytRanking.myRank.ToString ();

            break;

        case PVPType.Battlefield:
            lblNull2.gameObject.active = false;
            lblNull4.gameObject.active = false;
            lblBPlayerdedication.text  = BtnGameManager.yt.Rows[0]["PVPPoint"].YuanColumnText.Parse(0).ToString();
            lblBPlayerMilitary.text    = BtnGameManager.yt.Rows[0]["Rank"].YuanColumnText;
            lblBPlayerName.text        = BtnGameManager.yt.Rows[0]["PlayerName"].YuanColumnText;
            picBHead.atlas             = yuanPicManager.picPlayer[BtnGameManager.yt.Rows[0]["ProID"].YuanColumnText.Parse(0) - 1].atlas;
            picBHead.spriteName        = yuanPicManager.picPlayer[BtnGameManager.yt.Rows[0]["ProID"].YuanColumnText.Parse(0) - 1].spriteName;
            // lblBPlayerNowLegion.text = BtnGameManager.yt.Rows[0][""].YuanColumnText;
            //lblBPlayerPost.text = BtnGameManager.yt.Rows[0][""].YuanColumnText;
            if (BtnGameManagerBack.isInLegion)
            {
                if (lblInPVP != null)
                {
                    lblInPVP.gameObject.SetActiveRecursively(true);
                }
            }
            else
            {
                if (lblInPVP != null)
                {
                    lblInPVP.gameObject.SetActiveRecursively(false);
                }
            }

            SetPVP8NoteString("PVP8Info", lblBPlayerNote);
            //sqlMy=string.Format ("Select (Select count(*) from {3} where a.{0}<{0} or (a.{0}={0} and a.PlayerID<PlayerID)) as ROW_NUMBER,a.{0},a.{1},a.PlayerID from {3} a where PlayerID={2} order by ROW_NUMBER", "BattlefieldDedication", "PlayerName", BtnGameManager.yt.Rows[0]["PlayerID"].YuanColumnText, "PlayerInfo");
            //InRoom.GetInRoomInstantiate().GetYuanTable(sqlMy, "DarkSword2", ytRanking);
            InRoom.GetInRoomInstantiate().GetRankOne(yuan.YuanPhoton.RankingType.Rank, BtnGameManager.yt.Rows[0]["PlayerID"].YuanColumnText, ytRanking);
            while (ytRanking.IsUpdate)
            {
                yield return(new WaitForSeconds(0.1f));
            }
            lblBPlayerRanking.text = PVPRankNum.ToString();

            break;

        case PVPType.Lists:

            lblNull2.gameObject.active = false;
            lblNull4.gameObject.active = false;
            lblListsPoint.text         = BtnGameManager.yt.Rows[0]["ListsPoint"].YuanColumnText;
            lblCeiling.text            = BtnGameManager.yt.Rows[0]["ListsCeiling"].YuanColumnText;
            if (BtnGameManager.yt.Rows[0]["Corps2v2ID"].YuanColumnText != "" || BtnGameManager.yt.Rows[0]["Corps4v4ID"].YuanColumnText != "")
            {
                if (BtnGameManagerBack.isInPVP)
                {
                    if (lblInPVP != null)
                    {
                        lblInPVP.gameObject.SetActiveRecursively(true);
                    }
                }
                else
                {
                    if (lblInPVP != null)
                    {
                        lblInPVP.gameObject.SetActiveRecursively(false);
                    }
                }
                //InRoom.GetInRoomInstantiate().GetYuanTable(string.Format("Select * from Corps where id ='{0}' or id='{1}'", BtnGameManager.yt.Rows[0]["Corps2v2ID"].YuanColumnText, BtnGameManager.yt.Rows[0]["Corps4v4ID"].YuanColumnText), "DarkSword2", ytCrop);
                InRoom.GetInRoomInstantiate().GetTableForID(BtnGameManager.yt.Rows[0]["Corps2v2ID"].YuanColumnText, yuan.YuanPhoton.TableType.Corps, ytCrop);
                while (ytCrop.IsUpdate)
                {
                    yield return(new WaitForSeconds(0.5f));
                }
                //Debug.Log("-------------------------------yyyyyyyyyyyyyyyyyyyyyyyyy:" + yuan.YuanPhoton.CorpType.PVP2.ToString());
                if (ytCrop.Rows.Count > 0)
                {
                    yrPVP2 = ytCrop.SelectRowEqual("PlayerNumber", "2");
                    yrPVP4 = ytCrop.SelectRowEqual("PlayerNumber", "4");

                    if (yrPVP2 != null)
                    {
                        lblL2Fail.text    = yrPVP2["FailNum"].YuanColumnText == ""?"0":yrPVP2["FailNum"].YuanColumnText;
                        lblL2Game.text    = (yrPVP2["FailNum"].YuanColumnText.Parse(0) + yrPVP2["VictoryNum"].YuanColumnText.Parse(0)).ToString();
                        lblL2Victory.text = yrPVP2["VictoryNum"].YuanColumnText == ""?"0":yrPVP2["VictoryNum"].YuanColumnText;
                        if (lblL2Game.text.Parse(0) == 0)
                        {
                            lblL2Winning.text = "0%";
                        }
                        else
                        {
                            lblL2Winning.text = (yrPVP2["VictoryNum"].YuanColumnText.Parse(0) / lblL2Game.text.Parse(0) * 100).ToString() + "%";
                        }

                        lblL2ListsLevel.text = yrPVP2["SelfLevel"].YuanColumnText;
                        //lblL2ListsRanking.text = yrPVP2["Ranking"].YuanColumnText;
                        lblL2ListsRanking.text = BtnGameManager.yt[0]["Rank"].YuanColumnText;
                    }
                    else
                    {
                        lblNull2.gameObject.active = true;
                        objPVP2.SetActiveRecursively(false);
                    }

                    if (yrPVP4 != null)
                    {
                        lblL4Fail.text    = yrPVP4["FailNum"].YuanColumnText == ""?"0":yrPVP4["FailNum"].YuanColumnText;
                        lblL4Game.text    = (yrPVP4["FailNum"].YuanColumnText.Parse(0) + yrPVP4["VictoryNum"].YuanColumnText.Parse(0)).ToString();
                        lblL4Victory.text = yrPVP4["VictoryNum"].YuanColumnText == ""?"0":yrPVP4["VictoryNum"].YuanColumnText;

                        if (lblL4Game.text.Parse(0) == 0)
                        {
                            lblL4Winning.text = "0%";
                        }
                        else
                        {
                            lblL4Winning.text = (yrPVP4["VictoryNum"].YuanColumnText.Parse(0) / lblL2Game.text.Parse(0) * 100).ToString() + "%";
                        }

                        lblL4ListsLevel.text = yrPVP4["SelfLevel"].YuanColumnText;
                        //lblL4ListsRanking.text = yrPVP4["Ranking"].YuanColumnText;
                        lblL4ListsRanking.text = BtnGameManager.yt[0]["Rank"].YuanColumnText;
                    }
                    else
                    {
                        lblNull4.gameObject.active = true;
                        objPVP4.SetActiveRecursively(false);
                    }
                }
                else
                {
                    lblNull2.gameObject.active = true;
                    lblNull4.gameObject.active = true;
                    this.gameObject.SetActiveRecursively(false);
                }
            }
            else
            {
                lblNull2.gameObject.active = true;
                this.gameObject.SetActiveRecursively(false);
            }

            break;
        }
    }