Пример #1
0
        public void OnClickPvpFighterButtonHandler(PvpFighterButton fighterBtn)
        {
            if (GameProxy.instance.PvpAction <= 0)
            {
                ConfirmTipsView.Open(Localization.Get("ui.pvp_formation_view.notEnoughChallengeTimesAndGoToBuy"), GoToBuyAction);
                return;
            }

            PvpProxy.instance.ChallengeFighter = fighterBtn.pvpFighterInfo;

            //			string id = "";
            //			for(int i = 0,count= fighterBtn.pvpFighterInfo.heroTeamDataList.Count;i<count;i++)
            //			{
            //				HeroTeamProtoData data = fighterBtn.pvpFighterInfo.heroTeamDataList[i];
            //				id = string.Format("{0}{1},",id,data.id);
            //
            //			}
            Debugger.Log(string.Format("挑战对手{0}:playerid:{1}", fighterBtn.pvpFighterInfo.id, fighterBtn.pvpFighterInfo.playerInfo.instanceID));
            //PvpFormationView.Open(true);
            //PVPEmbattleView.Open(true);
            PvpController.instance.CLIENT2LOBBY_RANK_ARENA_CHANLLENGE_REQ(PvpProxy.instance.ChallengeFighter);
            //LuaTable friendCtrlLua = (LuaTable)LuaScriptMgr.Instance.CallLuaFunction("gamemanager.GetCtrl","friend_controller")[0];
            //friendCtrlLua.GetLuaFunction("RoleInfoLookUpReq").Call(fighterBtn.pvpFighterInfo.id,(int)FunctionOpenType.FightCenter_Arena);
        }
Пример #2
0
        public void OnResetItemHandler(GameObject go, int index)
        {
            PvpFighterButton fightBtn = go.GetComponent <PvpFighterButton>();

            fightBtn.SetPvpFighterInfo(PvpProxy.instance.PvpInfo.fighterInfoList[index]);
        }