| | |
| | | { |
| | | leaderWord.SetActive(true); |
| | | leaderWord.Play(); |
| | | leaderText.text = !pathPosEvent.m_IsRandom ? Language.Get(pathPosEvent.m_Text1) : |
| | | pathPosEvent.m_Text1 + UnityEngine.Random.Range((int)pathPosEvent.m_Value1, (int)pathPosEvent.m_Value2); |
| | | leaderText.text = Language.Get(!pathPosEvent.m_IsRandom ? pathPosEvent.m_Text1 : |
| | | pathPosEvent.m_Text1 + UnityEngine.Random.Range((int)pathPosEvent.m_Value1, (int)pathPosEvent.m_Value2 + 1)); |
| | | ForceRefreshLayout(); |
| | | } |
| | | else if (pathPosEvent.m_PosEvent == PosEvent.TargetWord) |
| | | { |
| | |
| | | for (int i = 0; i < GoldRushManager.followWorkerCount; i++) |
| | | { |
| | | GoldRushManager.Instance.NotifyPathEvent(pathPosEvent.m_PosEvent, isBack, tendID, i, |
| | | pathPosEvent.m_Text1 + UnityEngine.Random.Range((int)pathPosEvent.m_Value1, (int)pathPosEvent.m_Value2)); |
| | | pathPosEvent.m_Text1 + UnityEngine.Random.Range((int)pathPosEvent.m_Value1, (int)pathPosEvent.m_Value2 + 1)); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 强制刷新Layout,解决嵌套Layout和ContentSizeFitter的重叠问题 |
| | | /// </summary> |
| | | async UniTask ForceRefreshLayout() |
| | | { |
| | | await UniTask.DelayFrame(2); |
| | | LayoutRebuilder.ForceRebuildLayoutImmediate(leaderWord.GetComponent<RectTransform>()); |
| | | } |
| | | } |
| | | |