Beispiel #1
0
        // 移动结束回调
        protected void onMoveEndHandle(NumAniSeqBase dispObj)
        {
            if (m_ptList.Count() > 0 && !m_bDiePt)  // 说明还有 WayPoint 可以走
            {
                MazePtBase pt = m_ptList[0];
                m_ptList.RemoveAt(0);
                pt.moveToDestPos(m_mazePlayer);
            }
            else    // 如果运行到终点位置
            {
                m_ptList.Clear();

                if (m_BDiedPlayEffect)
                {
                    playDieAniAndSound();
                }

                //bool bChangeScene = false;
                if (!m_bBombPt && !m_bDiePt)     // 如果胜利
                {
                    //Ctx.m_instance.m_maze.mazeData.mazeScene.show();
                    //bChangeScene = true;

                    if (Ctx.m_instance.m_maze.mazeData.curSceneIdx == (int)eSceneIndex.eSecond)
                    {
                        Ctx.m_instance.m_maze.mazeData.roomInfo.showLightWin();
                        Ctx.m_instance.m_maze.mazeData.mazePlayer.hide();
                    }
                    else
                    {
                        Ctx.m_instance.m_maze.mazeData.mazeScene.showStar();
                    }
                }
                m_bBombPt         = false;
                m_bDiePt          = false;
                m_BDiedPlayEffect = false;
                Ctx.m_instance.m_uiMgr.loadAndShow(UIFormID.eUIMaze);

                UIMaze uiMaze = Ctx.m_instance.m_uiMgr.getForm(UIFormID.eUIMaze) as UIMaze;
                if (uiMaze != null)
                {
                    uiMaze.toggleResetBtn(true);
                }

                string path = "";
                path = Path.Combine(Ctx.m_instance.m_cfg.m_pathLst[(int)ResPathType.ePathAudio], "Ground.mp3");
                Ctx.m_instance.m_soundMgr.stop(path);
                path = Path.Combine(Ctx.m_instance.m_cfg.m_pathLst[(int)ResPathType.ePathAudio], "GameOver.mp3");
                Ctx.m_instance.m_soundMgr.play(path, false);

                //if(bChangeScene)
                //{
                //    if (Ctx.m_instance.m_maze.mazeData.curSceneIdx == (int)eSceneIndex.eFirst)
                //    {
                //        Ctx.m_instance.m_maze.mazeData.mazeScene.loadSecondScene();
                //    }
                //}
            }
        }
Beispiel #2
0
        public void loadSecondScene()
        {
            UIMaze uiMaze = Ctx.m_instance.m_uiMgr.getForm(UIFormID.eUIMaze) as UIMaze;

            if (uiMaze != null)
            {
                uiMaze.enterSecond();
            }
            Ctx.m_instance.m_soundMgr.unloadAll();
            Ctx.m_instance.m_maze.mazeData.curSceneIdx = (int)eSceneIndex.eSecond;
            Ctx.m_instance.m_sceneSys.loadScene("MazeSecond.unity", onResLoadScene);
        }