예제 #1
0
        public void Init(MineralRoot root)
        {
            if (root == null)
            {
                return;
            }

            m_Root = root;

            GamingMapArea gamingArea = root.m_GamingMapArea;

            if (gamingArea != null)
            {
                Area[] areas = FindObjectsOfType <Area>();
                if (areas != null && areas.Length > 0)
                {
                    for (int iArea = 0; iArea < areas.Length; iArea++)
                    {
                        Area area = areas[iArea];
                        if (area.Uid == gamingArea.m_AreaId)
                        {
                            m_Marks    = area.GetMineralSemaphoreMarks();
                            m_RootMark = area.m_MineralRoot;
                        }
                    }
                }
            }
        }
예제 #2
0
        private void OnEnable()
        {
            m_Target = target as MineralRoot;
            GamingMapArea gamingArea = m_Target.m_GamingMapArea;

            if (gamingArea != null)
            {
                Area[] areas = FindObjectsOfType <Area>();
                if (areas != null && areas.Length > 0)
                {
                    for (int iArea = 0; iArea < areas.Length; iArea++)
                    {
                        Area area = areas[iArea];
                        if (area.Uid == gamingArea.m_AreaId)
                        {
                            marks = area.GetMineralSemaphoreMarks();
                        }
                    }
                }
            }
        }