Example #1
0
        public void initMazeRoomCount(int count_)
        {
            m_mazeRoomList.Clear();
            m_itemCount = count_;
            MazeRoom mazeRoom = null;
            string   path     = "";

            for (int idx = 0; idx < m_itemCount; ++idx)
            {
                if (Ctx.m_instance.m_maze.mazeData.bInFisrstScene())
                {
                    mazeRoom = new MazeRoom(idx);
                }
                else
                {
                    mazeRoom = new MazeRoomSecond(idx);
                }
                m_mazeRoomList.Add(mazeRoom);
                path            = string.Format("RootGo/Plane_{0}", idx);
                mazeRoom.selfGo = UtilApi.GoFindChildByPObjAndName(path);
                if (0 != idx && 4 != idx)
                {
                    mazeRoom.mazeIOControl.enableDrag();
                }
                mazeRoom.init();
            }

            path    = "RootGo/SplitGo";
            m_trans = UtilApi.GoFindChildByPObjAndName(path).transform;

            adjustInitState();
        }
Example #2
0
        public void initMazeRoomCount(int count_)
        {
            m_mazeRoomList.Clear();
            m_itemCount = count_;
            MazeRoom mazeRoom = null;
            string path = "";
            for(int idx = 0; idx < m_itemCount; ++idx)
            {
                if (Ctx.m_instance.m_maze.mazeData.bInFisrstScene())
                {
                    mazeRoom = new MazeRoom(idx);
                }
                else
                {
                    mazeRoom = new MazeRoomSecond(idx);
                }
                m_mazeRoomList.Add(mazeRoom);
                path = string.Format("RootGo/Plane_{0}", idx);
                mazeRoom.selfGo = UtilApi.GoFindChildByPObjAndName(path);
                if (0 != idx && 4 != idx)
                {
                    mazeRoom.mazeIOControl.enableDrag();
                }
                mazeRoom.init();
            }

            path = "RootGo/SplitGo";
            m_trans = UtilApi.GoFindChildByPObjAndName(path).transform;

            adjustInitState();
        }