public void SetSelectOverEffect() { if (m_OldEffectParam != null) { return; } UEffectParamBase param = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_WarMain_Select, _tfAttachParent: this.HeadIcon.transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); m_OldEffectParam = param; UEffectPrefabParam paramPrefab = (UEffectPrefabParam)param; paramPrefab.EffectGameObject.transform.SetAsFirstSibling(); UEffectParamBase paramex = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_WarMain_SelectEX, _tfAttachParent: this.HeadIcon.transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref paramex); m_OldEffectParamEX = paramex; UEffectPrefabParam paramPrefabEX = (UEffectPrefabParam)paramex; paramPrefabEX.EffectGameObject.transform.SetAsFirstSibling(); // 移除开放效果 if (ItemData.bOpenEffect) { if (m_OpenEffectParam != null) { UEffectManager.Instance.DestroyEffect(UEffectType.UET_EffectPrefab, ref m_OpenEffectParam); m_OpenEffectParam = null; } } }
public void showUpGradeFrame() { UpgradeFrame.SetActive(true); #region recordShareImg CaptureScreen.GetInstance().CaptureAreaImage(new CaptureAreaImgData(shareImgPath, GetRecordRect())); #endregion DwonFrame.SetActive(false); UpgradeImg.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_RankImage, WndID.WND_ID_WAR_MAIN_FRAME, 1, LogicDataCenter.rankDataManager.getRankID()); if (m_RankEffectParam != null) { UEffectManager.Instance.DestroyEffect(UEffectType.UET_EffectPrefab, ref m_RankEffectParam); m_RankEffectParam = null; } int nOffset = LogicDataCenter.rankDataManager.getRankID() - 1; if (nOffset >= 0) { UEffectParamBase param = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_WarMain_RankEffect1 + nOffset, _tfAttachParent: this.UpgradeImg.transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); m_RankEffectParam = param; UEffectPrefabParam paramPrefab = (UEffectPrefabParam)param; paramPrefab.EffectGameObject.transform.SetAsFirstSibling(); } // 显示描述 UpRankName.text = LogicDataCenter.rankDataManager.getRankName(); }
public void DestorySelectOverEffect() { if (m_OldEffectParam != null) { UEffectManager.Instance.DestroyEffect(UEffectType.UET_EffectPrefab, ref m_OldEffectParam); m_OldEffectParam = null; } if (m_OldEffectParamEX != null) { UEffectManager.Instance.DestroyEffect(UEffectType.UET_EffectPrefab, ref m_OldEffectParamEX); m_OldEffectParamEX = null; } // 添加开放效果 if (ItemData.bOpenEffect) { if (m_OpenEffectParam != null) { UEffectManager.Instance.DestroyEffect(UEffectType.UET_EffectPrefab, ref m_OpenEffectParam); m_OpenEffectParam = null; } UEffectParamBase param = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_WarMain_CanJoinEffect, _tfAttachParent: this.HeadIcon.transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); m_OpenEffectParam = param; UEffectPrefabParam paramPrefab = (UEffectPrefabParam)param; paramPrefab.EffectGameObject.transform.SetAsFirstSibling(); } }
public void ShowEndOfWar(bool bIsWin) { SetVisible(true); StateImage.sprite = USpriteManager.Instance.DefaultSprite; if (bIsWin) { //StateImage.sprite = VictoryImage; EndOfWarEffect = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_UEndOfWarView_Victory, _tfAttachParent: StateImage.transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref EndOfWarEffect); UEffectPrefabParam paramPrefab = (UEffectPrefabParam)EndOfWarEffect; // paramPrefab.EffectGameObject.transform.localPosition = new Vector3(25, -8, 0); // 播放胜利音效 playWinSound(); } else { //StateImage.sprite = FailedImage; EndOfWarEffect = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_UEndOfWarView_Failure, _tfAttachParent: StateImage.transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref EndOfWarEffect); UEffectPrefabParam paramPrefab = (UEffectPrefabParam)EndOfWarEffect; // paramPrefab.EffectGameObject.transform.localPosition = new Vector3(25, -8, 0); // 播放失败音效 playFailedSound(); } //缩放动画 Sequence ShowEndOfWarEequence = DOTween.Sequence(); ShowEndOfWarEequence //ShowEndOfWarEequence.Append(StateImage.rectTransform.DOSizeDelta(new Vector2(1218, 651), duration, snapping) // .SetDelay(delay) // .SetEase(Ease.OutFlash, amplitude, period)) .Append(ContinueImage.DOFade(1.0f, ButtonDuration) .SetDelay(delay)) .Insert(1, ContinueButton.DOFade(1.0f, ButtonDuration) .SetDelay(delay)) .Insert(1, ContinueText.DOFade(1.0f, ButtonDuration) .SetDelay(delay)); ShowEndOfWarEequence.OnKill(() => ShowEndOfWarEequence = null); // 进入战绩界面前按键设为false if (EntityFactory.MainHero != null) { SkillCtrl sc = EntityFactory.MainHero.GetComponent <SkillCtrl>(); if (sc != null) { sc.enable = false; } } Invoke("onContinueBtnClick", 6f); }
internal void AddGuideEffect(int _nEffectID) { UEffectParamBase param = new UEffectPrefabParam((UEffectPrefabType)_nEffectID, GetTransform()); if (UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param)) { m_dicGuideEffect.Add(param); } }
public void DestoryTalentUpdateCanUseEffect() { if (m_OldEffectParam == null) { return; } UEffectParamBase param = (UEffectParamBase)m_OldEffectParam; UEffectManager.Instance.DestroyEffect(UEffectType.UET_EffectPrefab, ref param); m_OldEffectParam = null; }
public void Start() { LogicDataCenter.lifeHeroDataManager.AddPrizeTaskDataHandler(SetTaskData); obtainBtn.onClick.AddListener(OnObtainBtnClick); obtainBtn.GetComponentInChildren <Text>().text = ULocalizationService.Instance.Get("UIView", "LifeHeroCulture", "PrizeFrameObtainBtn"); UEffectParamBase param = new UEffectPrefabParam( _eType: UEffectPrefabType.UEPT_LifeHero_PrizeFrame_ObtainBtn, _tfAttachParent: obtainBtn.transform, _bAutoDestroy: true); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); }
// 开启XP充能完成特效 private void openXPChargeOverEffect() { // 充能完成特效 if (xpChargeOverEffect == null) { UEffectParamBase param = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_UWarBottomCenter_XpSkillChargeOver, _tfAttachParent: transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); xpChargeOverEffect = (UEffectPrefabParam)param; } else { xpChargeOverEffect.EffectGameObject.SetActive(true); } }
public void StartPK(PKPosInfo posInfo) { admit.gameObject.SetActive(true); curCountDownTime = 5; centerPos = new Vector3(posInfo.pos[0], posInfo.pos[1], posInfo.pos[2]); StartTimer((int)EMT_PKinfo_Timer.COUNTDOWN); UEffectParamBase param = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_PKInfo_PKStart, _tfAttachParent: this.gameObject.transform, _bAutoDestroy: true); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); m_EffectParam = param; Data.UISoundConfig.SSchemeUSoundData soundData = new Data.UISoundConfig.SSchemeUSoundData(); if (Data.UISoundConfig.UISoundConfig.Instance.GetData(SoundFilter, SoundKey_CountDown, ref soundData)) { SoundManager.CreateUISound(soundData.USoundID); } }
public void SetSelectDownShotEffect() { if (m_OldEffectParamEX != null) { return; } UEffectParamBase param = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_UWaitingRoom_SelectDownLight, _tfAttachParent: this.transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); m_OldEffectParamEX = param; UEffectPrefabParam paramPrefab = (UEffectPrefabParam)param; paramPrefab.EffectGameObject.transform.localPosition = new Vector3(0, 0, -100); }
public void SetSelectOverLightEffect() { if (m_OldEffectParam != null) { return; } UEffectParamBase param = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_UWaitingRoom_SelectOverLight, _tfAttachParent: this.transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); m_OldEffectParam = param; UEffectPrefabParam paramPrefab = (UEffectPrefabParam)param; paramPrefab.EffectGameObject.transform.SetAsFirstSibling(); }
internal void ShowReward(UGuideMsgData _gData) { if (RewardComponent == null) { return; } RewardComponent.GuideTextField.text = string.Empty; RewardComponent.GuideTextField.DOText(_gData.strMsgText, 1.0f).SetAutoKill(true); RewardComponent.gameObject.SetActive(true); if (!m_listUsingRewardComponent.Contains(RewardComponent)) { m_listUsingRewardComponent.Add(RewardComponent); } m_bNeedUpdateSibling = true; UEffectParamBase param = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_GuideWidget_Reward_heroUnlock, _tfAttachParent: RewardComponent.transform, _bAutoDestroy: true); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); m_RewardEffect = param; }
public void SetXpSkillFireEffect(int nSlotId) { if (IsOutOfMyTeamArray(nSlotId)) { return; } if (dicOldUEffectParam.ContainsKey(nSlotId)) { return; } TeamRightWndItem myTeamItem = m_ArrayMyTeam[nSlotId]; UEffectParamBase param = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_UTeamRight_XpSkillFire, _tfAttachParent: myTeamItem.HeroIconImage.transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); dicOldUEffectParam[nSlotId] = param; UEffectPrefabParam paramPrefab = (UEffectPrefabParam)param; paramPrefab.EffectGameObject.transform.localPosition = new Vector3(0, 0, 0); }
private bool LoadEffect() { m_effectParamArray[0] = new UEffectPrefabParam( _eType: UEffectPrefabType.UEPT_LifeHero_Entrance_01, _tfAttachParent: this.transform, _bAutoDestroy: true); if (!UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref m_effectParamArray[0])) { return(false); } m_effectParamArray[1] = new UEffectPrefabParam( _eType: UEffectPrefabType.UEPT_LifeHero_Entrance_02, _tfAttachParent: this.transform, _bAutoDestroy: true); if (!UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref m_effectParamArray[1])) { return(false); } (m_effectParamArray[0] as UEffectPrefabParam).EffectGameObject.SetActive(false); (m_effectParamArray[1] as UEffectPrefabParam).EffectGameObject.SetActive(false); return(true); }
public void SetXpSkillFireEffect(int nSlotId) { TeammateViewItem myTeamItem; if (!m_dicMyTeam.TryGetValue(nSlotId, out myTeamItem)) { return; } if (dicOldUEffectParam.ContainsKey(nSlotId)) { return; } UEffectParamBase param = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_UTeamRight_XpSkillFire, _tfAttachParent: myTeamItem.HeroIconImage.transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); dicOldUEffectParam[nSlotId] = param; UEffectPrefabParam paramPrefab = (UEffectPrefabParam)param; paramPrefab.EffectGameObject.transform.localPosition = new Vector3(0, 0, 0); }
private void LoadAddHeroOrUpSatrEffectByCultuerID(int i) { if (m_canAddOrUpSatrArray[i] != null) { UEffectManager.Instance.DestroyEffect(UEffectType.UET_EffectPrefab, ref m_canAddOrUpSatrArray[i]); m_canAddOrUpSatrArray[i] = null; } if (m_hasHeroCulture.ContainsKey(i)) { int starLv = LogicDataCenter.playerSystemDataManager.GetHeroStarLv(m_hasHeroCulture[i]); if (starLv < 1) { Debug.LogWarningFormat("sartLv({0}) < 1", starLv); return; } if (GameLogicAPI.isHeroCanUpStar(m_hasHeroCulture[i], starLv, true)) { m_canAddOrUpSatrArray[i] = new UEffectPrefabParam( _eType: UEffectPrefabType.UEPT_LifeHero_Can_AddHero_Upstar, _tfAttachParent: cultureArray[i].geneBtn.transform, _bAutoDestroy: false); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref m_canAddOrUpSatrArray[i]); (m_canAddOrUpSatrArray[i] as UEffectPrefabParam).EffectGameObject.transform.SetLocalPosition(new Vector3(0, 24, 0)); } } else { if (LogicDataCenter.lifeHeroDataManager.CanAddLifeHero()) { m_canAddOrUpSatrArray[i] = new UEffectPrefabParam( _eType: UEffectPrefabType.UEPT_LifeHero_Can_AddHero_Upstar, _tfAttachParent: cultureArray[i].cultureBtn.transform, _bAutoDestroy: false); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref m_canAddOrUpSatrArray[i]); (m_canAddOrUpSatrArray[i] as UEffectPrefabParam).EffectGameObject.transform.SetLocalPosition(new Vector3(0, -150, 0)); } } }
public void SetTalentUpdateCanUseEffect() { if (m_OldEffectParam != null) { m_OldEffectParam.EffectGameObject.SetActive(true); return; } UEffectPrefabType effectType = UEffectPrefabType.UEPT_UHeroTalent_TalentOpenButtonEffect; // 看玩家是否是新手(角色等级小于3级) if (LogicDataCenter.playerSystemDataManager.GetActorPlayerInfo().playerInfo.nLv < 3) { effectType = UEffectPrefabType.UEPT_UHeroTalent_TalentOpenButtonEffectForNewbie; } UEffectParamBase param = new UEffectPrefabParam(_eType: effectType, _tfAttachParent: this.LearnTalentHintEffect.transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); m_OldEffectParam = (UEffectPrefabParam)param; m_OldEffectParam.EffectGameObject.SetActive(true); }
public void EndPK(PKResult result) { admit.gameObject.SetActive(false); elapsedTime.gameObject.SetActive(false); elapsedTimeDes.gameObject.SetActive(false); distanceDes.gameObject.SetActive(false); distance.gameObject.SetActive(false); KillTimer((int)EMT_PKinfo_Timer.COUNTDOWN); KillTimer((int)EMT_PKinfo_Timer.ELAPSEDTIME); curCountDownTime = 0; curElapsedTime = 0; if (m_EffectParam != null) { UEffectManager.Instance.DestroyEffect(UEffectType.UET_EffectPrefab, ref m_EffectParam); m_EffectParam = null; } Data.UISoundConfig.SSchemeUSoundData soundData = new Data.UISoundConfig.SSchemeUSoundData(); switch (result.nResult) { case 0: { if (result.bForceEnd) { // 强制结束不让播光效 break; } UEffectParamBase param = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_PKInfo_PKLost, _tfAttachParent: this.gameObject.transform, _bAutoDestroy: true); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); if (Data.UISoundConfig.UISoundConfig.Instance.GetData(SoundFilter, SoundKey_Lost, ref soundData)) { SoundManager.CreateUISound(soundData.USoundID); } } break; case 1: { UEffectParamBase param2 = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_PKInfo_PKWin, _tfAttachParent: this.gameObject.transform, _bAutoDestroy: true); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param2); if (Data.UISoundConfig.UISoundConfig.Instance.GetData(SoundFilter, SoundKey_Win, ref soundData)) { SoundManager.CreateUISound(soundData.USoundID); } } break; case 2: { UEffectParamBase param3 = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_PKInfo_PKTie, _tfAttachParent: this.gameObject.transform, _bAutoDestroy: true); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param3); if (Data.UISoundConfig.UISoundConfig.Instance.GetData(SoundFilter, SoundKey_Tied, ref soundData)) { SoundManager.CreateUISound(soundData.USoundID); } } break; default: break; } }
public void SetData(UListWarMainModeItem item) { HeadIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_WarMainMode, WndID.WND_ID_WAR_MAIN_FRAME, item.nModeID); if (HeadIcon.sprite == null) { HeadIcon.gameObject.SetActive(false); } else { HeadIcon.gameObject.SetActive(true); } RankInvalidFrame.gameObject.SetActive(false); RankFrame.gameObject.SetActive(false); RankTipBtn.gameObject.SetActive(false); RankStarFrame.gameObject.SetActive(false); if (item.nModeID == (int)EWarModeDef.MODE_RankVS) { RankTipBtn.gameObject.SetActive(true); // 自己是否有排位信息 int nMatchType = EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_MATCHTYPE); int nRankScore = EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_RANKSCORE); int nRankGrade = EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_RANKGRADE); int nRankIconID = GameLogicAPI.getRankIconIDByGrade(nMatchType, nRankGrade); int nRankStar = GameLogicAPI.getActorRankStar(nMatchType, nRankScore); int nMaxRankStar = GameLogicAPI.getActorCurRankMaxStar(nMatchType, nRankScore); IntPtr ptr = GameLogicAPI.getActorRankNameByGrade(nMatchType, nRankGrade); string strRankName = ""; if (ptr != IntPtr.Zero) { strRankName = IntPtrHelper.Ptr2Str(ptr); } RankImg.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_RankImage, WndID.WND_ID_WAR_MAIN_FRAME, 1, nRankIconID); if (RankImg.sprite == null || nRankScore <= 0) { RankInvalidFrame.gameObject.SetActive(true); RankFrame.gameObject.SetActive(false); } else { RankStarFrame.gameObject.SetActive(true); for (int index = 0; index < RankStarFrame.childCount; ++index) { if (nRankStar > 0) { RankStarFrame.GetChild(index).GetComponent <Image>().sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_RankStarImage, WndID.WND_ID_WAR_MAIN_FRAME, 2); nRankStar--; nMaxRankStar--; } else if (nMaxRankStar > 0) { RankStarFrame.GetChild(index).GetComponent <Image>().sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_RankStarImage, WndID.WND_ID_WAR_MAIN_FRAME, 1); nMaxRankStar--; } else { RankStarFrame.GetChild(index).GetComponent <Image>().gameObject.SetActive(false); } } RankInvalidFrame.gameObject.SetActive(false); RankFrame.gameObject.SetActive(true); // 设置胜场 胜率 段位描述 星级 ActorPlayerInfo info = LogicDataCenter.playerSystemDataManager.GetActorPlayerInfo(); int WinRate = info.playerInfo.nRankMatchNum > 0? (info.playerInfo.nRankWinNum * 100 / info.playerInfo.nRankMatchNum): 0; RankDetailDes.text = String.Format("{0}:", ULocalizationService.Instance.Get("UIView", "WarStatistic", "MapWinCount")) + info.playerInfo.nRankWinNum + " " + String.Format("{0}:", ULocalizationService.Instance.Get("UIView", "WarStatistic", "MapWinRate")) + WinRate + "%"; RankGradeDes.text = strRankName; RankScore.text = "" + nRankScore; if (m_RankEffectParam != null) { UEffectManager.Instance.DestroyEffect(UEffectType.UET_EffectPrefab, ref m_RankEffectParam); m_RankEffectParam = null; } int nOffset = info.playerInfo.nRankIconID - 1; if (nOffset >= 0) { UEffectParamBase param = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_WarMain_RankEffect1 + nOffset, _tfAttachParent: this.RankImg.transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); m_RankEffectParam = param; UEffectPrefabParam paramPrefab = (UEffectPrefabParam)param; paramPrefab.EffectGameObject.transform.SetAsFirstSibling(); } } } // 隐藏模式详细描述 以及 图片 ModeDesText.text = item.strModeDesc; ModeDesText.gameObject.SetActive(false); // 设置tooltip //m_tooltip = this.gameObject.AddComponent<UTooltipTrigger>(ETooltipStyle.ETS_Default); //if (m_tooltip) //{ // string stTitleDesc = item.strModeTooltip; // UBB.toHtml(ref stTitleDesc, UBB_FORMAT_TYPE.UGUI); // m_tooltip.SetText(UTooltipParamName.BodyText, "<color=#FFFFFFFF><size=20>" + stTitleDesc + "</size></color>"); // m_tooltip.tipPosition = TipPosition.MouseTopRightCorner; // m_tooltip.backgroundTint.a = 0; //} if (m_OpenEffectParam != null) { UEffectManager.Instance.DestroyEffect(UEffectType.UET_EffectPrefab, ref m_OpenEffectParam); m_OpenEffectParam = null; } if (item.bOpenEffect) { UEffectParamBase param = new UEffectPrefabParam(_eType: UEffectPrefabType.UEPT_WarMain_CanJoinEffect, _tfAttachParent: this.HeadIcon.transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); m_OpenEffectParam = param; UEffectPrefabParam paramPrefab = (UEffectPrefabParam)param; paramPrefab.EffectGameObject.transform.SetAsFirstSibling(); } ItemData = item; #region 新手引导部分 if (!item.bUseGuideWidget) { gameObject.RemoveComponent <Guide.UGuideWidget>(); } else { Guide.UGuideWidget guideWidget = gameObject.GetComponent <Guide.UGuideWidget>(); if (guideWidget == null) { guideWidget = this.gameObject.AddComponent <Guide.UGuideWidget>(); } guideWidget.GuideID = (GUIDE.EGuideNodeID)item.GuideWidgetData.nGuideID; guideWidget.GuideStepID = item.GuideWidgetData.nGuideStepID; guideWidget.GuideEffectID = item.GuideWidgetData.nGuideEffectID; guideWidget.IsForceGuide = item.GuideWidgetData.bForeceGuide; } #endregion }
private IEnumerator PlayEffect() { m_isPlayingEffect = true; int index = m_injectMsgData.lifeHero.nCultureID; if (cultureArray == null || index >= cultureArray.Length) { Debug.LogError("预制体培养仓个数不对,无法播放光效."); m_isPlayingEffect = false; yield break; } if (m_heroModleArray[index] != null) { SceneEffectManager.Instance.DestroySceneEffect(ref m_heroModleArray[index]); m_heroModleArray[index] = null; } SoundManager.CreateUISound((int)LifeHeroSoundID.ADD_LIFEHERO_SOUND); m_fillupEffectParam = new UEffectPrefabParam( _eType: UEffectPrefabType.UEPT_LifeHero_FillUp, _tfAttachParent: cultureArray[index].cultureBtn.transform, _bAutoDestroy: false); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref m_fillupEffectParam); yield return(new WaitForSeconds(1.1f)); cultureArray[index].cultureBtn.GetComponent <Image>().enabled = false; UEffectManager.Instance.DestroyEffect(UEffectType.UET_EffectPrefab, ref m_fillupEffectParam); m_fillupEffectParam = null; SceneEffectParamBase sceneEffectParam = new SceneEffectParamBase((int)ESceneEffectID.SE_LifeHero_VerticalDownBlink, heroMountPoints[index], _bAutoPlay: true); SceneEffectManager.Instance.CreateSceneEffect(ref sceneEffectParam); yield return(new WaitForSeconds(0.7f)); SceneEffectManager.Instance.DestroySceneEffect(ref sceneEffectParam); sceneEffectParam = new SceneEffectParamBase((int)ESceneEffectID.SE_LifeHero_DNASpiralUp, heroMountPoints[index], _bAutoPlay: true); SceneEffectManager.Instance.CreateSceneEffect(ref sceneEffectParam); yield return(new WaitForSeconds(0.6f)); SceneEffectManager.Instance.DestroySceneEffect(ref sceneEffectParam); bool isSuccess = FillingCultureWithHero(m_injectMsgData.lifeHero.nCultureID, m_injectMsgData.lifeHero.nHeroID, false); if (isSuccess) { if (LogicDataCenter.lifeHeroDataManager.AllLifeHero.Count == (int)ELifeHeroType.LIFEHERO_MAX_COUNT) { if (m_openShareFrame) { m_openShareFrame = !m_openShareFrame; #region recordShare shareTex2D = new Texture2D((int)ShareRawImg.rectTransform.sizeDelta.x, (int)ShareRawImg.rectTransform.sizeDelta.y); yield return(new WaitForSeconds(1.2f)); CaptureScreen.GetInstance().CaptureAreaImage(new CaptureAreaImgData(shareImgName, GetRecordRect())); yield return(new WaitForSeconds(0.5f)); //Invoke("OpenRecordShareFrame", 0.5f); OpenRecordShareFrame(); #endregion } } else { yield return(new WaitForSeconds(1.2f)); UEffectParamBase param = new UEffectPrefabParam( _eType: UEffectPrefabType.UEPT_LifeHero_InjectFrame_Title, _tfAttachParent: injectFrame.transform, _bAutoDestroy: true); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); injectFrame.OpenInjectFrame(this, m_injectMsgData.lifeHero.nHeroID, param); } } m_isPlayingEffect = false; prizeFrame.SetObtainBtn(); SetReplaceBtnVisible(); yield break; }
void onCompleteScore(int nLevel) { if (nLevel >= (int)EN_PlayerGrade.ENPLAYERGRADE_MAX || nLevel < (int)EN_PlayerGrade.ENPLAYERGRADE_S_1) { return; } medalImage.gameObject.SetActive(true); UEffectPrefabType enEffectPreabTypeContinue = new UEffectPrefabType(); UEffectPrefabType enEffectPreabType = new UEffectPrefabType(); EN_PlayerGrade playerGradeType = (EN_PlayerGrade)nLevel; int nSpriteIndex = 0; switch (playerGradeType) { case EN_PlayerGrade.ENPLAYERGRADE_S_1: { enEffectPreabTypeContinue = UEffectPrefabType.UEPT_UWarRecordTableEnd_Medal_S_Continue; enEffectPreabType = UEffectPrefabType.UEPT_UWarRecordTableEnd_Medal_S; nSpriteIndex = 0; } break; case EN_PlayerGrade.ENPLAYERGRADE_A_ADD_2: { enEffectPreabTypeContinue = UEffectPrefabType.UEPT_UWarRecordTableEnd_Medal_A_Continue; enEffectPreabType = UEffectPrefabType.UEPT_UWarRecordTableEnd_Medal_A_ADD; nSpriteIndex = 1; } break; case EN_PlayerGrade.ENPLAYERGRADE_A_3: { enEffectPreabTypeContinue = UEffectPrefabType.UEPT_UWarRecordTableEnd_Medal_A_Continue; enEffectPreabType = UEffectPrefabType.UEPT_UWarRecordTableEnd_Medal_A; nSpriteIndex = 2; } break; case EN_PlayerGrade.ENPLAYERGRADE_B_ADD_4: { enEffectPreabTypeContinue = UEffectPrefabType.UEPT_UWarRecordTableEnd_Medal_B_Continue; enEffectPreabType = UEffectPrefabType.UEPT_UWarRecordTableEnd_Medal_B_ADD; nSpriteIndex = 3; } break; case EN_PlayerGrade.ENPLAYERGRADE_B_5: case EN_PlayerGrade.ENPLAYERGRADE_B_6: { enEffectPreabTypeContinue = UEffectPrefabType.UEPT_UWarRecordTableEnd_Medal_B_Continue; enEffectPreabType = UEffectPrefabType.UEPT_UWarRecordTableEnd_Medal_B; nSpriteIndex = 4; } break; case EN_PlayerGrade.ENPLAYERGRADE_C_ADD_7: case EN_PlayerGrade.ENPLAYERGRADE_C_ADD_8: { enEffectPreabTypeContinue = UEffectPrefabType.UEPT_UWarRecordTableEnd_Medal_C_Continue; enEffectPreabType = UEffectPrefabType.UEPT_UWarRecordTableEnd_Medal_C_ADD; nSpriteIndex = 5; } break; case EN_PlayerGrade.ENPLAYERGRADE_C_9: case EN_PlayerGrade.ENPLAYERGRADE_C_10: { enEffectPreabTypeContinue = UEffectPrefabType.UEPT_UWarRecordTableEnd_Medal_C_Continue; enEffectPreabType = UEffectPrefabType.UEPT_UWarRecordTableEnd_Medal_C; nSpriteIndex = 6; } break; default: { return; } } medalImage.sprite = medalSprite[nSpriteIndex]; UEffectParamBase param = new UEffectPrefabParam(enEffectPreabType, _tfAttachParent: this.medalImage.transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref param); // TODO 上一个弹出牌子动画播放完之后执行下面的 UEffectParamBase paramContinue = new UEffectPrefabParam(enEffectPreabTypeContinue, _tfAttachParent: this.medalImage.transform); UEffectManager.Instance.CreateEffect(UEffectType.UET_EffectPrefab, ref paramContinue); playMedalSound(); }