| Fight/MapTransferUtility.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/Stage/MapEditor/Game/ClientSceneManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/Stage/MapEditor/Game/TransferGroup.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/RealmAnimationBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/RealmModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/RealmStageBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/RealmWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Fight/MapTransferUtility.cs
@@ -228,8 +228,13 @@ GActor _npc = GAMgr.Instance.GetCloserNPC(_hero.Pos, npcID); if (_npc != null) { //Debug.LogFormat(" |-- 在视野内"); _destPostion = _npc.Pos; NpcID = npcID; MapTransferDoType = E_MapTransferDoType.Npc; _hero.MoveToPosition(_destPostion); yield break; } } else Fight/Stage/MapEditor/Game/ClientSceneManager.cs
@@ -344,7 +344,10 @@ { var _refreshEvent = new EventRefreshNPCHandler(); _refreshEvent.Init(_event as Evt_RefreshMonster); m_EventHandlerDict.Add(_refreshEvent.GetEventID(), _refreshEvent); if (!m_EventHandlerDict.ContainsKey(_refreshEvent.GetEventID())) { m_EventHandlerDict.Add(_refreshEvent.GetEventID(), _refreshEvent); } } } Fight/Stage/MapEditor/Game/TransferGroup.cs
@@ -142,7 +142,8 @@ float _y = 0; if (m_StartPos.y > _p.position.y) { _y = Constants.hurtAniCurve.animationCurve.Evaluate(m_InCreaseTime) * (m_StartPos.y - _p.position.y) + (1 - m_InCreaseTime) * (m_StartPos.y - _p.position.y); var _offset = m_StartPos.y - _p.position.y; _y = Constants.hurtAniCurve.animationCurve.Evaluate(m_InCreaseTime) * _offset + (1 - m_InCreaseTime) * _offset; } else { System/Realm/RealmAnimationBehaviour.cs
@@ -9,14 +9,19 @@ [SerializeField] float m_Radius = 100f; [SerializeField] float m_Duration = 1f; [SerializeField] TweenCurve m_TweenCurve; [SerializeField] Transform m_RealmStageCenter; [SerializeField] Transform m_ContainerLine; [SerializeField] RealmStageBehaviour[] m_RealmStages; [SerializeField] Transform m_ContainerEffectLine; [SerializeField] UIEffect[] m_EffectLines; Coroutine m_RotateCoroutine = null; float m_DeltaAngle { get { return 360f / 8; } } public event Action onRotateComplete; RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } } public void SetDefault() { @@ -25,6 +30,28 @@ { m_RealmStages[i].transform.localPosition = GetPointPosition(i); m_RealmStages[i].animIndex = i; } m_ContainerEffectLine.localEulerAngles = Vector3.zero; DisplayEffectLines(); } void DisplayEffectLines() { var realmLevel = PlayerDatas.Instance.baseData.realmLevel; var stage = model.GetRealmStage(realmLevel); List<int> realms = null; if (model.TryGetRealmStages(stage, out realms)) { for (int i = 0; i < realms.Count; i++) { var level = realms[i] + 1; if (realmLevel >= level) { // m_EffectLines[i].Play(); // var animator = m_EffectLines[i].target.GetAnimator(); // animator.Play("idle", 0); } } } } @@ -40,13 +67,53 @@ Vector3 GetPointPosition(float angle) { var _x = transform.position.x + m_Radius * Mathf.Sin(Mathf.Deg2Rad * angle); var _y = transform.position.y + m_Radius * Mathf.Cos(Mathf.Deg2Rad * angle); var _z = transform.position.z; var _x = m_RealmStageCenter.position.x + m_Radius * Mathf.Sin(Mathf.Deg2Rad * angle); var _y = m_RealmStageCenter.position.y + m_Radius * Mathf.Cos(Mathf.Deg2Rad * angle); var _z = m_RealmStageCenter.position.z; return new Vector3(_x, _y, _z); } public void StartRotate() public void DisplayLevelUp(int index) { StartCoroutine(Co_DisplayLevelUp(index)); } IEnumerator Co_DisplayLevelUp(int index) { if (index >= m_EffectLines.Length) { yield break; } //m_EffectLines[index].Play(); //var animator = m_EffectLines[index].target.GetAnimator(); //animator.Play("open", 0, 0); //yield return WaitingForSecondConst.WaitMS1500; //animator.Play("idle", 0); var realmStage = GetRealmStageBeha(index + 1); if (realmStage != null) { realmStage.DisplayEffect(true); } yield return WaitingForSecondConst.WaitMS500; if (index == 3) { StartRotate(); } } RealmStageBehaviour GetRealmStageBeha(int index) { foreach (var realmStage in m_RealmStages) { if (realmStage.animIndex == index) { return realmStage; } } return null; } void StartRotate() { if (m_RotateCoroutine != null) { @@ -55,11 +122,13 @@ m_RotateCoroutine = StartCoroutine(Co_Rotate()); } public void StopRotate() public void Dispose() { StopAllCoroutines(); if (m_RotateCoroutine != null) { StopCoroutine(m_RotateCoroutine); m_RotateCoroutine = null; } } @@ -91,6 +160,7 @@ realmStage.gameObject.SetActive(true); } } m_EffectLines[0].StopImediatly(); rotate30 = true; } @@ -100,12 +170,20 @@ var position = GetPointPosition(cacheAngle - angle); m_RealmStages[i].transform.localPosition = position; } m_ContainerEffectLine.localEulerAngles = new Vector3(0, 0, angle); } m_ContainerLine.gameObject.SetActive(false); foreach (var realmStage in m_RealmStages) { realmStage.animIndex = (realmStage.animIndex + 5) % 9; } foreach (var effectLine in m_EffectLines) { effectLine.StopImediatly(); } m_ContainerEffectLine.localEulerAngles = Vector3.zero; if (onRotateComplete != null) { @@ -117,12 +195,6 @@ void TestReset() { SetDefault(); } [ContextMenu("Rotate")] void TestRotate() { StartRotate(); } } } System/Realm/RealmModel.cs
@@ -171,6 +171,24 @@ return m_RealmStages.Count - 1; } public int GetRealmStageEffect(int realmLevel) { var config = RealmConfig.Get(realmLevel); if (config != null) { switch (config.Quality) { case 1: return 7028; case 2: return 7029; case 3: return 7030; case 4: return 7031; case 5: return 7032; case 6: return 7033; } } return 7028; } public void SendLevelUpRealm() { CA523_tagCMRealmLVUp pak = new CA523_tagCMRealmLVUp(); System/Realm/RealmStageBehaviour.cs
@@ -35,6 +35,7 @@ DisplayBase(); DisplaySelect(); DisplayEffect(false); } void DisplayBase() @@ -53,6 +54,25 @@ } } public void DisplayEffect(bool levelUp) { m_Effect.StopImediatly(); if (PlayerDatas.Instance.baseData.realmLevel >= realmLevel) { m_Effect.effect = model.GetRealmStageEffect(realmLevel); m_Effect.Play(); Animator animator = null; if (m_Effect.target != null) { animator = m_Effect.target.GetAnimator(); } if (animator != null) { animator.Play(levelUp ? "open" : "idle", 0); } } } public void Dispose() { model.selectRealmRefresh -= SelectRealmRefresh; System/Realm/RealmWin.cs
@@ -158,7 +158,7 @@ void HideRealmUp() { m_ContainerRealmUp.gameObject.SetActive(false); m_RealmAnimation.StopRotate(); m_RealmAnimation.Dispose(); m_RealmBriefTween.Stop(); m_RealmBriefTween.SetEndState(); m_RealmLevelUpTween.Stop(); @@ -276,10 +276,15 @@ } else { if (stage != currentStage) List<int> realms = null; if (model.TryGetRealmStages(currentStage, out realms)) { m_RealmAnimation.StartRotate(); m_ContainerUnlockEquip.gameObject.SetActive(false); var index = realms.IndexOf(cacheRealmLevel); m_RealmAnimation.DisplayLevelUp(realms.IndexOf(cacheRealmLevel)); if (index == 3) { m_ContainerUnlockEquip.gameObject.SetActive(false); } } } cacheRealmLevel = realmLevel;