void OnViewNodeSetContent(UIMissionGoalNode node) { MissionProperty mp = PeCustomScene.Self.scenario.missionMgr.GetMissionProperty(m_TrackedIds[node.index]); node.SetContent("[C8C800]" + mp.name + "[-]", false, false); node.onSetChildNodeContent += OnSetViewNodeChildContent; SortedList <int, MissionGoal> goals = PeCustomScene.Self.scenario.missionMgr.GetGoals(m_TrackedIds[node.index]); if (goals != null) { _goals = goals.Values; node.UpdateChildNode(_goals.Count, missionTrackWnd.childNodePrefab); node.PlayTween(true); } else { node.UpdateChildNode(0, missionTrackWnd.childNodePrefab); } }
void OnSetMissionGoal(int goal_id, int mission_id) { int index = m_TrackedIds.FindIndex(item0 => item0 == mission_id); if (index != -1) { UIMissionGoalNode node = missionTrackWnd.GetNode(index); SortedList <int, MissionGoal> goals = PeCustomScene.Self.scenario.missionMgr.GetGoals(m_TrackedIds[node.index]); if (goals != null) { _goals = goals.Values; node.UpdateChildNode(goals.Count, missionTrackWnd.childNodePrefab); node.PlayTween(true); } else { node.UpdateChildNode(0, missionTrackWnd.childNodePrefab); } missionTrackWnd.repositionNow = true; } }