Esempio n. 1
0
        public void Init(TreasureRoot 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.GetSemaphoreMarks();
                            m_RootMark = area.m_TreasureRoot;
                        }
                    }
                }
            }
        }
Esempio n. 2
0
        private void OnEnable()
        {
            m_Target = target as TreasureRoot;
            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.GetSemaphoreMarks();
                        }
                    }
                }
            }
        }