Beispiel #1
0
        public void DoCameraShake()
        {
            UICamera ui_camera = null;

            //ThinksquirrelSoftware.Utilities.CameraShake camera_shake = null;
            if (UIHierarchyHelper.Instance != null)
            {
                ui_camera = UIHierarchyHelper.Instance.MainUICamera;
            }

            if (isTest)
            {
                ui_camera = m_TestCamera;
            }
            StartCoroutine(CampaignRatingDialogMH.DoUICameraShake(ui_camera, m_RankShakeOffsets, 0.2f));
        }
Beispiel #2
0
        //显示战斗结算界面
        public void ShowBattleResult(bool win)
        {
            CombatCamera combatCamera = null;

            if (Camera.main != null)
            {
                combatCamera = Camera.main.GetComponent <CombatCamera>();

                if (combatCamera != null)
                {
                    combatCamera.HoldingCamera = true;
                }
            }
            switch (_battleType)
            {
            case eBattleType.ExpeditionBattle:
                break;

            case eBattleType.TreasuryBattle:
            case eBattleType.ExpSpringBattle:
                LTResourceInstanceRatingGM com = ResInstanceRating.GetMonoILRComponent <LTResourceInstanceRatingGM>();
                com.OnShownAnimCompleted = OnRatingShownAnimFinished;
                com.BattleType           = _battleType;
                ResInstanceRating.CustomSetActive(true);
                if (win && _battleType == eBattleType.TreasuryBattle)
                {
                    FusionTelemetry.GamePlayData.PostEvent(FusionTelemetry.GamePlayData.gold_camp_topic,
                                                           FusionTelemetry.GamePlayData.gold_camp_event_id, FusionTelemetry.GamePlayData.gold_camp_umengId, "reward");
                }
                else if (win && _battleType == eBattleType.ExpSpringBattle)
                {
                    FusionTelemetry.GamePlayData.PostEvent(FusionTelemetry.GamePlayData.exp_camp_topic,
                                                           FusionTelemetry.GamePlayData.exp_camp_event_id, FusionTelemetry.GamePlayData.exp_camp_umengId, "reward");
                }
                break;

            case eBattleType.MainCampaignBattle:
                CampaignRatingDialogMH main_rating = CampaignRating.GetMonoILRComponent <CampaignRatingDialogMH>();
                main_rating.IsWon = m_CombatResult == eCombatOutcome.Win ? true : false;
                main_rating.onShownAnimCompleted = OnRatingShownAnimFinished;
                CampaignRating.CustomSetActive(true);
                LTGuideTips.IsEnableGuideTips = main_rating.IsWon;
                break;

            case eBattleType.ChallengeCampaign:
            case eBattleType.AlienMazeBattle:
                CommonRatingDialogLT challenge_rating = CommonCampaignRating.GetMonoILRComponent <CommonRatingDialogLT>();
                challenge_rating.IsWon                = m_CombatResult == eCombatOutcome.Win ? true : false;
                challenge_rating.IsShowHp             = true;
                challenge_rating.onShownAnimCompleted = OnRatingShownAnimFinished;
                CommonCampaignRating.CustomSetActive(true);
                break;

            case eBattleType.ArenaBattle:
                ArenaRatingDialogLT arena_rating = ArenaRating.GetMonoILRComponent <ArenaRatingDialogLT>();
                arena_rating.IsWon = m_CombatResult == eCombatOutcome.Win ? true : false;
                arena_rating.onShownAnimCompleted = OnRatingShownAnimFinished;
                ArenaRating.CustomSetActive(true);
                LTDailyDataManager.Instance.SetDailyDataRefreshState();
                if (win)
                {
                    FusionTelemetry.GamePlayData.PostEvent(FusionTelemetry.GamePlayData.arena_topic,
                                                           FusionTelemetry.GamePlayData.arena_event_id, FusionTelemetry.GamePlayData.arena_umengId, "reward");
                }
                break;

            case eBattleType.HonorArena:
                var harc = HonorArenaResult.GetMonoILRComponent <HonorArenaResultController>();
                harc.onShownAnimCompleted = OnRatingShownAnimFinished;
                HonorArenaResult.CustomSetActive(true);
                if (win)
                {
                    FusionTelemetry.GamePlayData.PostEvent(FusionTelemetry.GamePlayData.honor_topic,
                                                           FusionTelemetry.GamePlayData.honor_event_id, FusionTelemetry.GamePlayData.honor_umengId, "reward");
                }
                break;

            case eBattleType.BossBattle:
            case eBattleType.AllianceCampaignBattle:
                if (_battleType == eBattleType.BossBattle)
                {
                    LTDailyDataManager.Instance.SetDailyDataRefreshState();
                }
                LTWorldBossBattleResult boss_rating = WorldBossRating.GetMonoILRComponent <LTWorldBossBattleResult>();
                boss_rating.onShownAnimCompleted = OnRatingShownAnimFinished;
                WorldBossRating.CustomSetActive(true);
                break;

            case eBattleType.HeroBattle:
                heroBattleResult.mDMono.gameObject.CustomSetActive(true);
                heroBattleResult.onShownAnimCompleted = OnRatingShownAnimFinished;
                heroBattleResult.Show(m_CombatResult == eCombatOutcome.Win ? true : false);
                if (win)
                {
                    FusionTelemetry.GamePlayData.PostEvent(FusionTelemetry.GamePlayData.clash_topic,
                                                           FusionTelemetry.GamePlayData.clash_event_id, FusionTelemetry.GamePlayData.clash_umengId, "reward");
                }
                break;

            case eBattleType.TransferOrRob:
                CommonRatingDialogLT transferOrRob = CommonCampaignRating.GetMonoILRComponent <CommonRatingDialogLT>();
                transferOrRob.IsWon = m_CombatResult == eCombatOutcome.Win ? true : false;
                transferOrRob.onShownAnimCompleted = OnRatingShownAnimFinished;
                CommonCampaignRating.CustomSetActive(true);
                //添加自动结束战斗
                timer    = 5;
                sequence = ILRTimerManager.instance.AddTimer(1000, 10, delegate { AntoContinueClick(); });
                break;

            case eBattleType.LadderBattle:
                CommonRatingDialogLT ladder_rating = CommonCampaignRating.GetMonoILRComponent <CommonRatingDialogLT>();
                ladder_rating.IsWon = m_CombatResult == eCombatOutcome.Win ? true : false;
                ladder_rating.onShownAnimCompleted = OnRatingShownAnimFinished;
                CommonCampaignRating.CustomSetActive(true);
                timer = 3;
                if (win)
                {
                    FusionTelemetry.GamePlayData.PostEvent(FusionTelemetry.GamePlayData.ladder_topic,
                                                           FusionTelemetry.GamePlayData.ladder_event_id, FusionTelemetry.GamePlayData.ladder_umengId, "reward");
                }
                if (LadderManager.Instance.IsTrusteeship)
                {
                    sequence = ILRTimerManager.instance.AddTimer(1000, 10, delegate { AntoContinueClick(); });
                }
                break;

            default:
                if (_battleType == eBattleType.SleepTower && win)
                {
                    FusionTelemetry.GamePlayData.PostEvent(FusionTelemetry.GamePlayData.sleep_topic,
                                                           FusionTelemetry.GamePlayData.sleep_event_id, FusionTelemetry.GamePlayData.sleep_umengId, "reward");
                }
                CommonRatingDialogLT common_rating = CommonCampaignRating.GetMonoILRComponent <CommonRatingDialogLT>();
                common_rating.IsWon = m_CombatResult == eCombatOutcome.Win ? true : false;
                common_rating.onShownAnimCompleted = OnRatingShownAnimFinished;
                CommonCampaignRating.CustomSetActive(true);
                break;
            }
        }