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(); }
public void init() { if (Ctx.m_instance.m_maze.mazeData.bInFisrstScene()) { m_bigStartPnl = UtilApi.GoFindChildByPObjAndName("RootGo/Plane_4/BigStartPnl"); m_smallStarPnl_0 = UtilApi.GoFindChildByPObjAndName("RootGo/Plane_4/SmallStarPnl_0"); m_smallStarPnl_1 = UtilApi.GoFindChildByPObjAndName("RootGo/Plane_4/SmallStarPnl_1"); m_smallStarPnl_2 = UtilApi.GoFindChildByPObjAndName("RootGo/Plane_4/SmallStarPnl_2"); } }
public void init() { Ctx.m_instance.m_tableSys.getTable(TableID.TABLE_SPRITEANI); string path = "RootGo"; m_sceneRootGo = UtilApi.GoFindChildByPObjAndName(path); m_roomInfo.initMazeRoomCount(5); m_mazePlayer.init(); path = Path.Combine(Ctx.m_instance.m_cfg.m_pathLst[(int)ResPathType.ePathAudio], "Ground.mp3"); //Ctx.m_instance.m_soundMgr.play(path); m_mazeScene.init(); m_mazeScene.hide(); }
public void findSceneUIRootGo() { m_sceneUIRootGo = UtilApi.GoFindChildByPObjAndName("SceneUIRootGo"); }
override public void init() { for (int pathIdx = 0; pathIdx < (int)ePathIndex.eTotal; ++pathIdx) { if ((int)ePathIndex.eABC == pathIdx) { buildPathSecond(pathIdx); } else if ((int)ePathIndex.eACB == pathIdx) { if ((int)eRoomIndex.eB == m_fixIdx) { buildPathSecond(pathIdx); } else if ((int)eRoomIndex.eStart != m_fixIdx) { buildPathSecond(pathIdx); } } else if ((int)ePathIndex.eBAC == pathIdx) { if ((int)eRoomIndex.eB == m_fixIdx) { buildPathSecond(pathIdx); } } else if ((int)ePathIndex.eBCA == pathIdx) { if ((int)eRoomIndex.eB == m_fixIdx) { buildPathSecond(pathIdx); } } else if ((int)ePathIndex.eCAB == pathIdx) { if ((int)eRoomIndex.eB == m_fixIdx) { buildPathSecond(pathIdx); } else if ((int)eRoomIndex.eStart != m_fixIdx) { buildPathSecond(pathIdx); } } else if ((int)ePathIndex.eCBA == pathIdx) { if ((int)eRoomIndex.eB == m_fixIdx) { buildPathSecond(pathIdx); } else if ((int)eRoomIndex.eStart != m_fixIdx) { buildPathSecond(pathIdx); } } } // 第二个房间有一个花头 if (1 == m_iTag) { m_flowerHeadGo = UtilApi.GoFindChildByPObjAndName("RootGo/Plane_1/FlowerHeadGo"); m_flowerHeadEffect = Ctx.m_instance.m_sceneEffectMgr.addSceneEffect(33, m_flowerHeadGo, false, true, true); m_flowerHeadEffect.setLoopType(eSpriteLoopType.ePingPang); } // 第三个房间有一个花树 if (2 == m_iTag) { m_flowerTreeGo = UtilApi.GoFindChildByPObjAndName("RootGo/Plane_2/FlowerTree"); m_flowerTreeEffect = Ctx.m_instance.m_sceneEffectMgr.addSceneEffect(34, m_flowerTreeGo, false, true, true); } // 如果是第五个房间,会有一个窗户 if (4 == m_iTag) { m_darkWin = UtilApi.GoFindChildByPObjAndName("RootGo/Plane_4/WinGo/DarkWinGo"); m_lightWin = UtilApi.GoFindChildByPObjAndName("RootGo/Plane_4/WinGo/LightWinGo"); } }