public override void OnEnter() { m_DeltaTime = 0f; BattleCardManager.Instance.CreateCard(m_Manager.GetBattlePlayer().GetBattleRoundData().troopData.otherMembers); BattleType battleType = Games.CharacterLogic.Obj_MyselfPlayer.GetMe().battleType; if (battleType == BattleType.PVP || battleType == BattleType.WORLD_BOSS || battleType == BattleType.QxzbPvP || (battleType == BattleType.PVE && m_Manager.GetBattlePlayer().RoundCounter == 3) || (battleType == BattleType.CHONG_LOU && m_Manager.GetBattlePlayer().GetBattleRoundData().ChonglouLast)) { //BOSS出场 AudioManager.Instance.PlayEffectSound(SoundResource.SoundRes.battle_boss.ToString(), false, 0, Obj_MyselfPlayer.GetMe().acceleration); } if (Obj_MyselfPlayer.GetMe().battleType == BattleType.WORLD_BOSS) { BattleSlot[] battleSlots = BattleCardManager.Instance.BattleSlotArray[BattleCardType.E_BATTLE_CARD_TYPE_OTHER]; foreach (BattleSlot bs in battleSlots) { if (bs.Battle_Card != null) { bs.SetCurHp(Obj_MyselfPlayer.GetMe().worldBossHpBeginBattle, false); } } } }
public override void OnEnter() { m_DeltaTime = 0f; battleType = Obj_MyselfPlayer.GetMe().battleType; if (m_Manager.GetBattlePlayer().GetBattleRoundData().isWin&& battleType == BattleType.CHONG_LOU) { //显示本楼层奖励页面 //免费复活死亡卡牌 int money = Obj_MyselfPlayer.GetMe().pataRoundRewardMoney; int yuanbao = Obj_MyselfPlayer.GetMe().pataRoundRewardYuanbao; BattleUI.Instacne.ChonglouReword.GetComponent <ChonglouReword>().Display(money, yuanbao); m_TotalTime = 3.0f; } }
public override void OnEnter() { m_DeltaTime = 0f; BattleCardManager.Instance.DestroyAllBuffs(BattleCardType.E_BATTLE_CARD_TYPE_SELF); Obj_MyselfPlayer.GetMe().RemoveFriendFromBattleArray(); m_AccelerateBtn.SetActive(false); m_AutoForwardBtn.SetActive(false); Time.timeScale = 1f; m_Manager.GetBattlePlayer().GetBattleRoundData().isPlayed = true; if (!Obj_MyselfPlayer.GetMe().battleData.isWin) { //播放失败音效 AudioManager.Instance.PlayEffectSound(SoundResource.SoundRes.battle_lose.ToString()); m_BattleResult.SetActive(true); m_BattleResult.GetComponent <BattleResult>().ShowResult(false); BattleCardManager.Instance.DestroyCard(BattleCardType.E_BATTLE_CARD_TYPE_OTHER); } else { //播放胜利音效 AudioManager.Instance.PlayEffectSound(SoundResource.SoundRes.battle_win.ToString()); m_BattleResult.SetActive(true); m_BattleResult.GetComponent <BattleResult>().ShowResult(true); } }
public override void OnEnter() { m_DeltaTime = 0f; //增加的世界boss 和 重楼的处理在哪里? if (Obj_MyselfPlayer.GetMe().battleType == BattleType.PVE && !Obj_MyselfPlayer.GetMe().isGuideBattle) { //合全技提示 string key = "heti_" + Obj_MyselfPlayer.GetMe().accountID + "_" + Obj_MyselfPlayer.GetMe().curSubcopy.subCopyID; int is_shown = PlayerPrefs.GetInt(key, 0); bool heti_notice = TableManager.GetCopydetailByID(Obj_MyselfPlayer.GetMe().curSubcopy.subCopyID).HetiNotice == 1 ? true : false; if (is_shown != 1 && heti_notice) { GameObject heti_prompt_asset = Resources.Load("Widgets/HeTiPromptUI", typeof(GameObject)) as GameObject; GameObject heti_prompt = GameObject.Instantiate(heti_prompt_asset) as GameObject; GameObject anchor = GameObject.Find("UI Root (2D)/Camera/Anchor/Panel/Anchor/Panel-Top"); heti_prompt.transform.parent = anchor.transform; heti_prompt.transform.localPosition = new Vector3(156f, 328f, -20); heti_prompt.transform.localScale = new Vector3(0.6f, 0.6f, 0.6f); heti_prompt.SetActive(false); m_HetiPromptWidget = heti_prompt; PlayerPrefs.SetInt(key, 1); Debug.Log("Load Widgets/HeTiPromptUI"); } //副本前提示 key = "copy_front_" + Obj_MyselfPlayer.GetMe().accountID + "_" + Obj_MyselfPlayer.GetMe().curSubcopy.subCopyID; is_shown = PlayerPrefs.GetInt(key, 0); int copy_text = TableManager.GetCopydetailByID(Obj_MyselfPlayer.GetMe().curSubcopy.subCopyID).FontText; if (is_shown != 1 && copy_text != -1) { GameObject copy_prompt_asset = Resources.Load("Widgets/CopyPromptUI", typeof(GameObject)) as GameObject; GameObject copy_prompt = GameObject.Instantiate(copy_prompt_asset) as GameObject; GameObject anchor = GameObject.Find("UI Root (2D)/Camera/Anchor/Panel/Anchor/Panel-Top"); copy_prompt.transform.parent = anchor.transform; copy_prompt.transform.localPosition = new Vector3(267f, -93f, -20f); copy_prompt.transform.localScale = new Vector3(1f, 1f, 1f); copy_prompt.SetActive(false); m_CopyPromptWidget = copy_prompt; Debug.Log("Load Windows/CopyPromptUI"); } } //创建卡牌 BattleCardManager.Instance.CreateCard(m_Manager.GetBattlePlayer().GetBattleRoundData().troopData.selfMembers); //世界boss进去时的血量需要特殊初始化 }
public override void OnEnter() { m_TurnCounter = 0; m_StepCounter = 0; m_BattleRoundData = m_Manager.GetBattlePlayer().GetBattleRoundData(); //m_BattleActionBagList = m_Manager.GetBattlePlayer().BattleReportReader(m_BattleRoundData); m_CurAttackCard = null; m_CurActionBag = null; Obj_MyselfPlayer.GetMe().reviveCount = 0; BattleCardManager.Instance.MakeCardInBattling(); }
public override void OnEnter() { m_DeltaTime = 0f; m_TotalTime = 2f; AudioManager.Instance.PlayEffectSound(SoundResource.SoundRes.battle_phase.ToString(), Obj_MyselfPlayer.GetMe().acceleration); BattleType battleType = Games.CharacterLogic.Obj_MyselfPlayer.GetMe().battleType; switch (battleType) { case BattleType.PVE: switch (m_Manager.GetBattlePlayer().RoundCounter) { case 1: m_RoundTip_1.SetActive(true); m_RoundTip_1.GetComponent <Animation>().Play(); break; case 2: m_RoundTip_2.SetActive(true); m_RoundTip_2.GetComponent <Animation>().Play(); break; case 3: m_RoundTip_3.SetActive(true); m_RoundTip_3.GetComponent <Animation>().Play(); break; } break; case BattleType.PVP: case BattleType.QxzbPvP: m_RoundTip_PVP.SetActive(true); m_RoundTip_PVP.GetComponent <Animation>().Play(); break; case BattleType.WORLD_BOSS: //是世界boss开始战斗动画 m_RoundTip_PVP.SetActive(true); m_RoundTip_PVP.GetComponent <Animation>().Play(); break; case BattleType.CHONG_LOU: m_TotalTime = 0.1f; break; } }
public override void OnEnter() { m_DeltaTime = 0f; //for guide if (Obj_MyselfPlayer.GetMe().isLastBattleNotFinish&& !GuideManager.Instance.isEnd()) { Obj_MyselfPlayer.GetMe().isLastBattleNotFinish = false; } //end if (Obj_MyselfPlayer.GetMe().isGuideBattle) { Obj_MyselfPlayer.GetMe().battleData.isPlayed = false; Obj_MyselfPlayer.GetMe().isGuideBattle = false; GuideManager.Instance.FinishedStep(GuideManager.GUIDE_STEP.FIRST_COPY); Obj_MyselfPlayer.GetMe().OnBattleEnd(); //LoadingSliderKit.AsycLoadScene(Utils.UI_NAME_main); GameManager.Instance.LoadLevel(Utils.UI_NAME_Login); } else { switch (Obj_MyselfPlayer.GetMe().battleType) { case BattleType.PVE: if (m_Manager.GetBattlePlayer().GetBattleRoundData().isWin) { //副本后提示 string key = "copy_back_" + Obj_MyselfPlayer.GetMe().accountID + "_" + Obj_MyselfPlayer.GetMe().curSubcopy.subCopyID; int is_shown = PlayerPrefs.GetInt(key, 0); int copy_text = TableManager.GetCopydetailByID(Obj_MyselfPlayer.GetMe().curSubcopy.subCopyID).BackText; if (is_shown != 1 && copy_text != -1) { GameObject copy_prompt_asset = Resources.Load("Widgets/CopyPromptUI", typeof(GameObject)) as GameObject; GameObject copy_prompt = GameObject.Instantiate(copy_prompt_asset) as GameObject; GameObject anchor = GameObject.Find("UI Root (2D)/Camera/Anchor/Panel/Anchor/Panel-Top"); copy_prompt.transform.parent = anchor.transform; copy_prompt.transform.localPosition = new Vector3(267f, -93f, -20f); copy_prompt.transform.localScale = new Vector3(1f, 1f, 1f); copy_prompt.SetActive(false); m_CopyPromptWidget = copy_prompt; Debug.Log("Load Windows/CopyPromptUI"); } if (m_CopyPromptWidget != null) { TroopMember trmbr = m_Manager.GetBattlePlayer().GetBattleRoundData().FindCardByGUID(Obj_MyselfPlayer.GetMe().teamMemberArray[0]); m_CopyPromptWidget.GetComponent <CopyPromptUI>().Show(Obj_MyselfPlayer.GetMe().curSubcopy.subCopyID, false, trmbr.cardID); m_TotalTime = 10f; } else { NetworkSender.Instance().ClearBattleData(OnClearDataRet, Obj_MyselfPlayer.GetMe().curSubcopy.subCopyID); } } else { NetworkSender.Instance().ClearBattleData(OnClearDataRet, Obj_MyselfPlayer.GetMe().curSubcopy.subCopyID); } break; case BattleType.PVP: case BattleType.QxzbPvP: Obj_MyselfPlayer.GetMe().OnBattleEnd(); //LoadingSliderKit.AsycLoadScene(Utils.UI_NAME_main); GameManager.Instance.LoadLevel(Utils.UI_NAME_main); break; case BattleType.WORLD_BOSS: Obj_MyselfPlayer.GetMe().SetUserBaseData(Obj_MyselfPlayer.GetMe().battleData.pbBaseData); NetworkSender.Instance().RequestWorldBossInfo(OnClearDataRet); break; case BattleType.CHONG_LOU: NetworkSender.Instance().ClearPataBattleData(OnClearDataRet); break; } } }