Ejemplo n.º 1
0
    void CreateFormation(ButtonPvpInfo button, PvpOppInfo info)
    {
        TeamPrepareCardCtrl card;
        CardSample          cs;
        Card tmpCard;

        for (int i = 0; i < info.opps.Length; i++)
        {
            GameObject psObj = NGUITools.AddChild(button.formationRoot.gameObject, cardPrefab);
            if (psObj == null)
            {
                print("contentTeamPrepare no res!");
                return;
            }

            card    = psObj.GetComponent <TeamPrepareCardCtrl> ();
            cs      = CardSampleManager.Instance.getRoleSampleBySid(info.opps [i].sid);
            tmpCard = CardManagerment.Instance.createCard(info.opps [i].sid, info.opps [i].evoLevel, info.opps [i].surLevel);
            //找到对应的阵形点位
            Transform formationPoint = null;
            formationPoint          = button.formationRoot.transform.FindChild(FormationManagerment.Instance.getLoctionByIndex(info.formation, info.opps [i].index).ToString());
            card.transform.position = formationPoint.position;
            card.updateButton(info.opps [i]);
            card.initInfo(info.uid, info.opps [i].uid, null);
            card.fatherWindow = fatherWindow;
        }
    }
Ejemplo n.º 2
0
    void CreateFormation(ButtonPvpInfo button, PvpOppInfo info)
    {
        button.tenFormationRoot.SetActive(teamType == 10);
        for (int i = 0; i < info.opps.Length; i++)
        {
            RoleView cardView = NGUITools.AddChild(teamType == 10?button.tenFormationRoot:button.formationRoot, cardViewPrefab).GetComponent <RoleView> ();
            cardView.transform.localScale = new Vector3(0.65f, 0.65f, 0.65f);
            CardSample cs      = CardSampleManager.Instance.getRoleSampleBySid(info.opps [i].sid);
            Card       newcard = CardManagerment.Instance.createCard(cs.sid, info.opps [i].evoLevel, info.opps [i].surLevel);
            newcard.uid = info.opps [i].uid;
            newcard.setLevel(EXPSampleManager.Instance.getLevel(cs.levelId, info.opps [i].exp, 0));
            cardView.init(newcard, this, cardClickEvent);

            //找到对应的阵形点位
            Transform formationPoint = null;
            if (teamType == 10)
            {
                formationPoint = button.tenFormationRoot.transform.FindChild((info.opps[i].index + 1).ToString());
            }
            else
            {
                formationPoint = button.formationRoot.transform.FindChild(FormationManagerment.Instance.getLoctionByIndex(info.formation, info.opps [i].index).ToString());
            }

            cardView.transform.position = formationPoint.position;
            /** 从公会战来,显示血条 */
            if (comeFrom == FROM_GUILD_AREA || comeFrom == FROM_GUILD_AREA_CHALLENGE)
            {
                int index = info.opps[i].index;
                hpViews[index].gameObject.SetActive(true);
                hpViews[index].updateValue(info.opps[i].hpNow, info.opps[i].hpMax);
                cardView.GetComponent <BoxCollider>().enabled = false;
            }
        }
    }
Ejemplo n.º 3
0
    public override void buttonEventBase(GameObject gameObj)
    {
        base.buttonEventBase(gameObj);
        if (gameObj.name == "close")
        {
            finishWindow();
            ChatManagerment.Instance.chatCard = null;
            if (fatherWindow is MissionMainWindow)
            {
                EventDelegate.Add(OnHide, () => {
                    PvpInfoManagerment.Instance.setPvpType(PvpInfo.TYPE_PVP_FB);
                    UiManager.Instance.openDialogWindow <PvpInfoWindow> ();
                });
            }
            if (MissionManager.instance != null)
            {
                MissionManager.instance.showAll();
                MissionManager.instance.setBackGround();
            }
        }
        else if (gameObj.name == "root_head")
        {
            PvpOppInfo playerData = gameObj.transform.parent.GetComponent <RankLadderItemView>().data;
            M_onGetPlayerInfoCmp(playerData);

            /*
             * string uid=gameObj.transform.parent.GetComponent<RankLadderItemView>().data.uid;
             * LaddersGetPlayerInfoFPort fport=FPortManager.Instance.getFPort ("LaddersGetPlayerInfoFPort") as LaddersGetPlayerInfoFPort;
             * fport.access(uid,M_onGetPlayerInfoCmp);
             */
        }
    }
Ejemplo n.º 4
0
 //在杯赛中是否是玩家对手
 public bool isCupOpp(PvpOppInfo opp)
 {
     if (currentCompleteRound == 1)
     {
         if (opp.uid == oppInfos.oppInfo [1].uid)
         {
             return(true);
         }
     }
     else if (currentCompleteRound == 2)
     {
         if (opp.state == 1 && opp.uid == oppInfos.oppInfo [2].uid)
         {
             return(true);
         }
         else if (opp.state == 1 && opp.uid == oppInfos.oppInfo [3].uid)
         {
             return(true);
         }
     }
     else if (currentCompleteRound == 3)
     {
         for (int i = 4; i < oppInfos.oppInfo.Length; i++)
         {
             if (oppInfos.oppInfo [i].state == 1 && oppInfos.oppInfo [i].uid == opp.uid)
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Ejemplo n.º 5
0
    //解析ErlKVMessgae
    public bool parseKVMsg(ErlKVMessage message)
    {
        string str    = (message.getValue("msg") as ErlType).getValueString();
        bool   hasPvp = false;

        if (str == "ok")
        {
            hasPvp = true;
            ErlType type = message.getValue("info") as ErlType;
            if (type is ErlArray)
            {
                ErlArray array = type as ErlArray;
                //pvp信息过期时间戳
                int               time    = StringKit.toInt(array.Value [0].getValueString());
                string            rule    = array.Value [1].getValueString();
                int               round   = StringKit.toInt(array.Value [2].getValueString());
                ErlArray          arrays  = array.Value [3] as ErlArray;
                int               max     = arrays.Value.Length;
                List <PvpOppInfo> oppList = new List <PvpOppInfo> ();
                for (int i = 0; i < max; i++)
                {
                    ErlArray list = arrays.Value [i] as ErlArray;
                    oppList.Add(PvpOppInfo.pares(list));
                }
                PvpInfoManagerment.Instance.createPvpInfo(time, rule, round, oppList.ToArray());
            }
        }
        else if (str == "no_pvp")
        {
            PvpInfoManagerment.Instance.clearDate();
        }
        return(hasPvp);
    }
Ejemplo n.º 6
0
    void CreateFormation(ButtonPvpInfo buttonInfo, PvpOppInfo info)
    {
        GameObject          psObj;
        TeamPrepareCardCtrl button;
        PvpOppTeam          infoTeam;

        for (int i = 0; i < info.opps.Length; i++)
        {
            psObj = NGUITools.AddChild(buttonInfo.formationRoot.gameObject, (fatherWindow as PvpMainWindow).cardPrefab);
            if (psObj == null)
            {
                print("contentTeamPrepare no res!");
                return;
            }

            psObj.AddComponent <UIDragScrollView>();
            button   = psObj.GetComponent <TeamPrepareCardCtrl> ();
            infoTeam = info.opps[i];

            //找到对应的阵形点位
            Transform formationPoint = null;
            formationPoint            = buttonInfo.formationRoot.transform.FindChild(FormationManagerment.Instance.getLoctionByIndex(info.formation, infoTeam.index).ToString());
            button.transform.position = formationPoint.position;
            button.updateButton(infoTeam);
            button.initInfo(info.uid, infoTeam.uid, null);
            button.fatherWindow = fatherWindow;
        }
    }
Ejemplo n.º 7
0
 //清除数据
 public void clear()
 {
     if (oppInfos != null)
     {
         oppInfos = null;
     }
     if (pvpRankInfo != null)
     {
         pvpRankInfo = null;
     }
     if (bfLists != null)
     {
         bfLists = null;
     }
     if (cupOpp != null)
     {
         cupOpp = null;
     }
     if (callback != null)
     {
         callback = null;
     }
     if (currentOpp != null)
     {
         currentOpp = null;
     }
     this.currentCompleteRound = 0;
     this.isGetPrize           = false;
     this.oppIndex             = 0;
     this.callback             = null;
     this.isStartTime          = false;
 }
Ejemplo n.º 8
0
 public void initButton(PvpOppInfo info)
 {
     this.info        = info;
     playersName.text = info.name;
     playersLv.text   = "Lv." + EXPSampleManager.Instance.getLevel(USER_EXP_SID, info.exp, 0);
     ResourcesManager.Instance.LoadAssetBundleTexture(UserManager.Instance.getIconPath(info.headIcon), playerIcon);
     playerStateShow();
 }
    public override void read(ErlKVMessage message)
    {
        ErlArray list = message.getValue("msg") as ErlArray;

        pvpOppInfo = PvpOppInfo.pares(list);
        CardBookWindow.setChatPlayerUid(pvpOppInfo.uid);
        getSdkInfoBack(null);
    }
Ejemplo n.º 10
0
 /// <summary>
 /// 当请求玩家信息返回后 打开玩家信息面板
 /// </summary>
 /// <param name="_playerInfo">_player info.</param>
 private void M_onGetPlayerInfoCmp(PvpOppInfo _playerInfo)
 {
     PvpPlayerWindow.comeFrom = PvpPlayerWindow.FROM_LADDERS_FRIEND;
     UiManager.Instance.openWindow <PvpPlayerWindow> (
         (win) => {
         win.teamType = 10;
         win.initInfo(_playerInfo);
     });
 }
Ejemplo n.º 11
0
 /// <summary>
 /// 点击对手后 如果是真人,则请求改对手信息后 回调处理:显示玩家信息面板
 /// </summary>
 /// <param name="_playerInfo">_player info.</param>
 private void M_onGetPlayerInfoCmp(PvpOppInfo _playerInfo)
 {
     PvpPlayerWindow.comeFrom = PvpPlayerWindow.FROM_LADDERS;
     UiManager.Instance.openWindow <PvpPlayerWindow> (
         (win) => {
         win.teamType             = 10;
         win.currentLaddersPlayer = LaddersManagement.Instance.CurrentOppPlayer;
         win.initInfo(_playerInfo);
     });
 }
Ejemplo n.º 12
0
    public override void read(ErlKVMessage message)
    {
        ErlArray list = message.getValue("msg") as ErlArray;

        pvpOppInfo = PvpOppInfo.pares(list);
        if (readDataCallback2 != null)
        {
            readDataCallback2(pvpOppInfo);
            readDataCallback2 = null;
        }
    }
Ejemplo n.º 13
0
    public static PvpOppInfo pares(ErlArray list)
    {
        int      index     = 0;
        string   uid       = list.Value [index++].getValueString();
        string   name      = list.Value [index++].getValueString();
        string   guildName = list.Value [index++].getValueString();
        int      headIcon  = StringKit.toInt(list.Value [index++].getValueString());
        long     exp       = StringKit.toLong(list.Value [index++].getValueString());
        int      state     = StringKit.toInt(list.Value [index++].getValueString());
        ErlArray lists     = list.Value [index++] as ErlArray;
        int      combat    = StringKit.toInt(list.Value [index++].getValueString());
        int      allCombat = StringKit.toInt(list.Value [index++].getValueString());     //队伍中所有卡片战斗力 对于10人阵而言
        int      star      = StringKit.toInt(list.Value [index++].getValueString());
        int      vipLv     = StringKit.toInt(list.Value [index++].getValueString());

        index = 0;
        int      formation = StringKit.toInt(lists.Value [index++].getValueString());
        ErlArray bArray    = lists.Value [index++] as ErlArray;
        int      beastSid  = 0;
        long     beastExp  = 0;
        string   beastUid  = "";

        if (bArray.Value.Length != 0)
        {
            beastSid = StringKit.toInt(bArray.Value [0].getValueString());
            beastExp = StringKit.toLong(bArray.Value [1].getValueString());
            beastUid = bArray.Value [2].getValueString();
        }
        ErlArray tArray = lists.Value [index++] as ErlArray;

        index = 0;
        List <PvpOppTeam> ptList = new List <PvpOppTeam> ();

        for (int j = 0; j < tArray.Value.Length; j++)
        {
            ErlArray ea = tArray.Value [j] as ErlArray;
            if (ea.Value.Length != 0)
            {
                int        teamOppSid   = StringKit.toInt(ea.Value [0].getValueString());
                long       teamOppExp   = StringKit.toLong(ea.Value [1].getValueString());
                string     teamOppUid   = ea.Value [2].getValueString();
                int        evoLevel     = StringKit.toInt(ea.Value [3].getValueString());
                int        surLevel     = StringKit.toInt(ea.Value [4].getValueString());
                int        teamOppIndex = j;
                PvpOppTeam pt           = new PvpOppTeam(teamOppSid, teamOppExp, teamOppIndex, teamOppUid, evoLevel, surLevel);
                ptList.Add(pt);
            }
        }
        PvpOppInfo opp = new      PvpOppInfo(uid, name, guildName, headIcon, exp, state, formation, beastSid, beastExp, beastUid, ptList.ToArray(), combat, star, vipLv);

        opp.allCombat = allCombat;
        return(opp);
    }
Ejemplo n.º 14
0
    public override void read(ErlKVMessage message)
    {
        ErlArray list = message.getValue("msg") as ErlArray;

        pvpOppInfo = PvpOppInfo.pares(list);

        if (readDataCallback != null)
        {
            readDataCallback();
            readDataCallback = null;
        }
        openWindow(null);
    }
Ejemplo n.º 15
0
    void CreateFormation(ButtonPvpInfo button, PvpOppInfo info)
    {
        for (int i = 0; i < info.opps.Length; i++)
        {
            TeamPrepareCardCtrl card = NGUITools.AddChild(button.formationRoot, cardPrefab).GetComponent <TeamPrepareCardCtrl> ();

            //找到对应的阵形点位
            Transform formationPoint = null;
            formationPoint          = button.formationRoot.transform.FindChild(FormationManagerment.Instance.getLoctionByIndex(info.formation, info.opps [i].index).ToString());
            card.transform.position = formationPoint.position;
            card.updateButton(info.opps [i]);
            card.initInfo(info.uid, info.opps [i].uid, null);
            card.fatherWindow = this;
        }
    }
Ejemplo n.º 16
0
 //设置杯赛对手
 public void setCupOpp(PvpOppInfo cupOpp)
 {
     this.cupOpp = cupOpp;
     bfLists     = new List <BattleFormationCard[]> ();
     BattleFormationCard[] bfs = new BattleFormationCard[10];
     for (int k = 0; k < cupOpp.opps.Length; k++)
     {
         bfs [k]     = new BattleFormationCard();
         bfs [k].loc = FormationManagerment.Instance.getLoctionByIndex(cupOpp.formation, cupOpp.opps [k].index);
         CardSample cs = CardSampleManager.Instance.getRoleSampleBySid(cupOpp.opps [k].sid);
         bfs [k].card = CardManagerment.Instance.createCard(cs.sid, cupOpp.opps [k].evoLevel, cupOpp.opps [k].surLevel);
         bfs [k].setLevel(EXPSampleManager.Instance.getLevel(cs.levelId, cupOpp.opps [k].exp, 0));
         bfs [k].setHp(-1);
         bfs [k].setHpMax(-1);
     }
     bfLists.Add(bfs);
 }
Ejemplo n.º 17
0
    void CreateFormation(PvpOppInfo info)
    {
        if (teamType == 10)
        {
            GameObject          psObj;
            TeamPrepareCardCtrl card;

            for (int i = 0; i < info.opps.Length; i++)
            {
                tenRoleRoot.gameObject.SetActive(true);
                psObj             = NGUITools.AddChild(tenRoleRoot, cardPref);
                card              = psObj.GetComponent <TeamPrepareCardCtrl> ();
                card.fatherWindow = this;
                //找到对应的阵形点位
                Transform formationPoint = null;
                formationPoint          = tenRoleRoot.transform.FindChild((info.opps [i].index + 1).ToString());
                card.transform.position = formationPoint.position;
                card.updateButton(info.opps [i]);
                card.initInfo(info.uid, info.opps [i].uid, null);
            }
        }
        else
        {
            GameObject          psObj;
            TeamPrepareCardCtrl card;

            for (int i = 0; i < info.opps.Length; i++)
            {
                psObj = NGUITools.AddChild(formationRoot, cardPref);
                if (psObj == null)
                {
                    print("contentTeamPrepare no res!");
                    return;
                }
                card = psObj.GetComponent <TeamPrepareCardCtrl> ();
                //找到对应的阵形点位
                Transform formationPoint = null;
                card.fatherWindow       = this;
                formationPoint          = formationRoot.transform.FindChild((info.opps [i].index + 1).ToString());
                card.transform.position = formationPoint.position;
                card.updateButton(info.opps [i]);
                card.initInfo(info.uid, info.opps [i].uid, null);
            }
        }
    }
Ejemplo n.º 18
0
    public override void read(ErlKVMessage message)
    {
        ErlArray list          = message.getValue("msg") as ErlArray;
        int      arenaTeam     = StringKit.toInt(list.Value[0].getValueString());
        int      arenaIntegral = StringKit.toInt(list.Value[1].getValueString());
        int      arenaRank     = StringKit.toInt(list.Value[2].getValueString());

        list = list.Value [3] as ErlArray;
        PvpOppInfo pvpOppInfo = PvpOppInfo.pares(list);

        pvpOppInfo.arenaIntegral = arenaIntegral;
        pvpOppInfo.arenaRank     = arenaRank;
        pvpOppInfo.arenaTeam     = arenaTeam;
        if (callback != null)
        {
            callback(pvpOppInfo);
        }
    }
Ejemplo n.º 19
0
    /** 专为公会战而生 */
    public static PvpOppInfo paresInfo(ErlArray list)
    {
        int     index     = 0;
        string  name      = list.Value [index++].getValueString();
        int     vip       = StringKit.toInt(list.Value [index++].getValueString());
        int     headIcon  = StringKit.toInt(list.Value [index++].getValueString());
        long    exp       = StringKit.toLong(list.Value [index++].getValueString());
        int     star      = StringKit.toInt(list.Value [index++].getValueString());
        int     beastSid  = 0;
        long    beastExp  = 0;
        ErlType beastType = list.Value [index++];

        if (beastType.getValueString() != "none")
        {
            ErlArray beastArray = beastType as ErlArray;
            beastSid = StringKit.toInt(beastArray.Value[0].getValueString());
            beastExp = StringKit.toLong(beastArray.Value[1].getValueString());
        }
        ErlArray          cardArray = list.Value [index++] as ErlArray;
        List <PvpOppTeam> ptList    = new List <PvpOppTeam> ();

        for (int i = 0; i < cardArray.Value.Length; i++)
        {
            ErlArray ea = cardArray.Value [i] as ErlArray;
            if (ea.Value.Length != 0)
            {
                int  teamOppSid   = StringKit.toInt(ea.Value [0].getValueString());
                long teamOppExp   = StringKit.toLong(ea.Value [1].getValueString());
                int  evoLevel     = StringKit.toInt(ea.Value [2].getValueString());
                int  surLevel     = StringKit.toInt(ea.Value [3].getValueString());
                int  teamOppIndex = StringKit.toInt(ea.Value [4].getValueString());
                /** 这个位置是后台算的位置,为了配合其他位置,需要调整数值 */
                teamOppIndex--;
                int        hpNow = StringKit.toInt(ea.Value [5].getValueString());
                int        hpMax = StringKit.toInt(ea.Value [6].getValueString());
                PvpOppTeam pt    = new PvpOppTeam(teamOppSid, teamOppExp, teamOppIndex, evoLevel, surLevel, hpNow, hpMax);
                ptList.Add(pt);
            }
        }
        string     guildName = list.Value [index++].getValueString();
        PvpOppInfo opp       = new PvpOppInfo(name, vip, headIcon, exp, star, beastSid, beastExp, ptList.ToArray(), guildName);

        return(opp);
    }
Ejemplo n.º 20
0
    public override void buttonEventBase(GameObject gameObj)
    {
        base.buttonEventBase(gameObj);
        if (gameObj.name == "buttonBattleStart")
        {
            if (isLadders)
            {
                PvpOppInfo oppInfo = LaddersManagement.Instance.CurrentOppPlayer.playerInfo;
                PvpInfoManagerment.Instance.setLadderPvpOppInfo(oppInfo);
            }
            else if (isPvP && PvpInfoManagerment.Instance.getPvpTime(null) <= 0)
            {
                UiManager.Instance.openDialogWindow <MessageLineWindow> ((win) => {
                    win.Initialize(LanguageConfigManager.Instance.getLanguage("s0420"));
                });
                return;
            }
            saveArmy();
        }
        else if (gameObj.name == "close")
        {
            if (BattleManager.Instance != null)
            {
                BattleManager.Instance.awardFinfish();
            }
            else
            {
                finishWindow();
            }

            if (MissionManager.instance != null)
            {
                MissionManager.instance.showAll();
                MissionManager.instance.setBackGround();
            }

            MaskWindow.UnlockUI();
            if (MissionInfoManager.Instance.mission != null && MissionInfoManager.Instance.mission.getPlayerPoint() != null)
            {
                MissionInfoManager.Instance.mission.getPlayerPoint().isBattlePrepared = false;
            }
        }
    }
Ejemplo n.º 21
0
    public void updateButton(GameObject each)
    {
        int oppIndex = StringKit.toInt(each.name) - 1;

        PvpOppInfo[] oppinfos = PvpInfoManagerment.Instance.getPvpInfo().oppInfo;
        if (oppIndex < 0 || oppIndex > oppinfos.Length - 1)
        {
            return;
        }
        PvpOppInfo opp = PvpInfoManagerment.Instance.getPvpInfo().oppInfo[oppIndex];

        pvpInfoIndex++;
        FormationSample sample = FormationSampleManager.Instance.getFormationSampleBySid(opp.formation);

        button = each.GetComponent <ButtonPvpInfo> ();
        button.initInfo(opp, fatherWindow);
        loadFormationGB(button, sample.getLength(), each);
        CreateFormation(button, opp);
    }
Ejemplo n.º 22
0
    public override void read(ErlKVMessage message)
    {
        base.read(message);

        if ((message.getValue("msg") as ErlType) != null && (message.getValue("msg") as ErlType).getValueString() == "error")
        {
            UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("GuildArea_54"));
            UiManager.Instance.BackToWindow <GuildMainWindow>();
            callBack = null;
            return;
        }

        ErlArray   array   = message.getValue("msg") as ErlArray;
        PvpOppInfo oppInfo = PvpOppInfo.paresInfo(array);

        if (callBack != null)
        {
            callBack(oppInfo);
            callBack = null;
        }
    }
Ejemplo n.º 23
0
    protected override void begin()
    {
        base.begin();
        PvpOppInfo opp = PvpInfoManagerment.Instance.getCurrentOpp();

        uid = opp.uid;
        ResourcesManager.Instance.LoadAssetBundleTexture(UserManager.Instance.getIconPath(opp.headIcon), button.headIcon);

        button.initInfo(opp, this);
        loadFormationGB(button, FormationSampleManager.Instance.getFormationSampleBySid(opp.formation).getLength(), button.gameObject);
        CreateFormation(button, opp);

        MaskWindow.UnlockUI();
        if (PvpInfoManagerment.Instance.isMs)
        {
            if (UiManager.Instance.getWindow <BattlePrepareWindowNew>() != null)
            {
                DestroyImmediate(UiManager.Instance.getWindow <BattlePrepareWindowNew>().gameObject);
            }
            Award award = AwardManagerment.Instance.miaoShaAward == null ? null : Award.mergeAward(AwardManagerment.Instance.miaoShaAward);
            AwardManagerment.Instance.miaoShaAward = null;
            PvpInfoManagerment.Instance.isMs       = false;
            BattleManager.isWaitForBattleData      = false;
            EffectManager.Instance.CreateEffectCtrlByCache(effectGameObject.transform, "Effect/UiEffect/Miaosha", null);
            MaskWindow.LockUI();
            StartCoroutine(Utils.DelayRun(() => {
                MaskWindow.UnlockUI();
            }, 2.2f));
            if (award != null)
            {
                StartCoroutine(Utils.DelayRun(() => {
                    UiManager.Instance.openDialogWindow <MKillAwardWindow>((win) => {
                        win.init(award);
                    });
                }, 2f));
            }
        }
    }
Ejemplo n.º 24
0
 public void autoBegin()
 {
     if (MissionInfoManager.Instance.autoGuaji && !MissionInfoManager.Instance.mSettings[1])
     {
         if (isLadders)
         {
             PvpOppInfo oppInfo = LaddersManagement.Instance.CurrentOppPlayer.playerInfo;
             PvpInfoManagerment.Instance.setLadderPvpOppInfo(oppInfo);
         }
         else if (isPvP && PvpInfoManagerment.Instance.getPvpTime(null) <= 0)
         {
             UiManager.Instance.openDialogWindow <MessageLineWindow> ((win) => {
                 win.Initialize(LanguageConfigManager.Instance.getLanguage("s0420"));
             });
             return;
         }
         saveArmy();
     }
     else if (MissionInfoManager.Instance.autoGuaji && MissionInfoManager.Instance.mSettings[1])
     {
         MissionInfoManager.Instance.autoGuaji = false;
     }
 }
Ejemplo n.º 25
0
 public void setCurrentOpp()
 {
     currentOpp = getOpp();
 }
Ejemplo n.º 26
0
 public void initInfo(PvpOppInfo opp)
 {
     this.oppItem = opp;
 }
Ejemplo n.º 27
0
 public void initInfo(PvpOppInfo opp, CallBack callback)
 {
     this.oppItem  = opp;
     this.callback = callback;
 }
Ejemplo n.º 28
0
 /// <summary>
 /// 特殊对于天梯可直接设置对手信息
 /// </summary>
 /// <param name="_oppInfo">_opp info.</param>
 public void setLadderPvpOppInfo(PvpOppInfo _oppInfo)
 {
     currentOpp = _oppInfo;
 }
Ejemplo n.º 29
0
 public void initInfo(PvpOppInfo opp, CallBack <bool> reLoadFriendWin)
 {
     this.oppItem         = opp;
     this.reLoadFriendWin = reLoadFriendWin;
 }
Ejemplo n.º 30
0
    public void M_update(PvpOppInfo _data, int index)
    {
        data  = _data;
        index = _data.ladderRank;

        label_name.text = _data.name;
        if (string.IsNullOrEmpty(data.guildName))
        {
            label_guild.text = Language("pvpPlayerWindow02") + Language("GuildLuckyNvShen_16");
        }
        else
        {
            label_guild.text = Language("pvpPlayerWindow02") + _data.guildName;
        }

        label_combat.text = Language("laddersPrefix_02") + _data.combat.ToString();

        label_rank.text = index.ToString();


        if (index <= 3)
        {
            label_rank.text = "";
            sprite_rankFlag.gameObject.SetActive(true);
            sprite_rankFlag.spriteName = "rank_" + index.ToString();
        }
        else
        {
            sprite_rankFlag.gameObject.SetActive(false);
        }

        ResourcesManager.Instance.LoadAssetBundleTexture(UserManager.Instance.getIconPath(_data.headIcon), texture_head);
        if (_data.vipLv > 0)
        {
            sprite_vip.gameObject.SetActive(true);
            sprite_vip.spriteName = "vip" + _data.vipLv;
        }
        else
        {
            sprite_vip.gameObject.SetActive(false);
        }
        int level = EXPSampleManager.Instance.getLevel(1, _data.exp, 0);

        label_level.text = level.ToString();

        label_horoscope.text = HoroscopesManager.Instance.getStarByType(_data.star).getName();
//		sprite_horoscope_icon.spriteName = HoroscopesManager.Instance.getStarByType (_data.star).getSpriteName ();


        LaddersTitleSample sample_1 = LaddersConfigManager.Instance.config_Title.M_getTitle(_data.prestige);

        if (sample_1 == null)
        {
            label_title.text = Language("laddersTip_20");
        }
        else
        {
            label_title.text = sample_1.name;
        }

        LaddersMedalSample sample_2 = LaddersConfigManager.Instance.config_Medal.M_getMedalBySid(_data.medalSid);

        if (sample_2 == null)
        {
            sprite_title_bg.spriteName = "medal_0";
        }
        else
        {
            sprite_title_bg.spriteName = "medal_" + Mathf.Min(sample_2.index + 1, 5);
        }
    }