Exemple #1
0
        public static FightResultBasePanel Create(FightType fightType, FightResultView view)
        {
            FightResultBasePanel panel = null;

            switch (fightType)
            {
            case FightType.PVE:            //普通副本
                panel = new PveFightResultPanel();
                break;

            case FightType.Arena:           //竞技场
                panel = new PvpFightResultPanel();
                break;

            case FightType.DailyPVE:        //每日副本
                panel = new DailyDungeonFightResultPanel();
                break;

            case FightType.Expedition:           //远征
                panel = new ExpeditionFightResultPanel();
                break;

            case FightType.WorldTree:       //世界树
                panel = new WorldTreeFightResultPanel();
                break;

            case FightType.WorldBoss:       //世界Boss
                break;

            case FightType.PVP:             //PVP
                panel = new PvpRaceFightResultPanel();
                break;

            case FightType.FirstFight:      //第一场战斗
            case FightType.SkillDisplay:    //技能展示
                break;

            case FightType.ConsortiaFight:    //公会战
                panel = new PvpFightResultPanel();
                break;

            case FightType.FriendFight:    //好友战
                panel = new FriendFightResultPanel();
                break;

            case FightType.MineFight:    //矿战
                panel = new MineFightResultPanel();
                break;
            }
            if (panel != null)
            {
                panel.view = view;
            }
            else
            {
                Debugger.LogError("[FightResultBasePanel]  create panel is null,please check this FightType is implement!!! fightType:" + fightType);
            }
            return(panel);
        }
Exemple #2
0
 void OnDestroy()
 {
     if (resultBasePanel != null)
     {
         resultBasePanel.OnDestroy();
     }
     resultBasePanel = null;
     AudioController.instance.StopAudio(AudioController.fireworks_audio);
 }
Exemple #3
0
        public void Show(bool isWin, FightType type)
        {
            Debugger.Log(string.Format("iswin:{0},fightType:{1}", isWin, type));
            _isWin     = isWin;
            _fightType = type;
            winRoot.SetActive(_isWin);
            lostRoot.SetActive(!_isWin);
            if (_isWin)
            {
                Prefab_HeroLevelUpView.SetActive(false);
                treasureBox.gameObject.SetActive(false);
                btn_root.SetActive(false);
                panelDrop.SetActive(false);
                int   star      = starNum;
                float heroDelay = (star + 1) * 0.3f;
                FightResultProxy.instance.CalcDropItem(type);
                _dropHeroAndEquipList = FightResultProxy.instance.DropHeroAndEquipList;
                ShowStars(star);
                ShowHeroLevelUp(heroDelay);
                ShowTotalExp(heroDelay);

                text_pass_time.text        = TimeUtil.FormatSecondToMinute(FightController.instance.fightCostTime);
                text_max_hit.text          = FightController.instance.comboCount.ToString();
                text_profession_name.text  = Localization.Get(GameProxy.instance.AccountName);
                text_profession_level.text = string.Format(Localization.Get("common.role_icon.role_lv"), GameProxy.instance.AccountLevel);
                AudioController.instance.PlayAudioRepeat(AudioController.fireworks_audio);
            }
            else
            {
                goFailedTimeOut.SetActive(FightProxy.instance.fightOverType == FightOverType.Timeout);
            }
            //extra hide
            for (int i = 0, count = tranExtraRoot.Length; i < count; i++)
            {
                int childCount = tranExtraRoot[i].childCount;
                for (int j = 0; j < childCount; j++)
                {
                    tranExtraRoot[i].GetChild(j).gameObject.SetActive(false);
                }
            }
            resultBasePanel = FightResultBasePanel.Create(type, this);
            if (resultBasePanel != null)
            {
                resultBasePanel.Init();
                //Invoke("AutoGoMainView",30);
            }
        }