// 移动到下一个开始点,需要跳跃
        public void moveToDestPos(MazeStartPt pt_)
        {
            string path = Path.Combine(Ctx.m_instance.m_cfg.m_pathLst[(int)ResPathType.ePathAudio], "Jump.mp3");
            Ctx.m_instance.m_soundMgr.play(path, false);

            Vector3 srcPos = m_mazePlayer.selfGo.transform.localPosition;
            Vector3 destPos = pt_.pos;
            //float time = 1;

            Vector3 midPt;      // 中间点
            midPt = (srcPos + destPos) / 2;
            midPt.y = 5;

            SimpleCurveAni curveAni = new SimpleCurveAni();
            m_numAniParal.addOneNumAni(curveAni);
            curveAni.setGO(m_mazePlayer.selfGo);
            curveAni.setTime(sTime);
            curveAni.setPlotCount(3);
            curveAni.addPlotPt(0, srcPos);
            curveAni.addPlotPt(1, midPt);
            curveAni.addPlotPt(2, destPos);
            curveAni.setAniEndDisp(onMove2DestEnd);

            curveAni.setEaseType(iTween.EaseType.easeInExpo);

            m_numAniParal.play();
        }
예제 #2
0
        // 移动到下一个开始点,需要跳跃
        public void moveToDestPos(MazeStartPt pt_)
        {
            string path = Path.Combine(Ctx.m_instance.m_cfg.m_pathLst[(int)ResPathType.ePathAudio], "Jump.mp3");

            Ctx.m_instance.m_soundMgr.play(path, false);

            Vector3 srcPos  = m_mazePlayer.selfGo.transform.localPosition;
            Vector3 destPos = pt_.pos;
            //float time = 1;

            Vector3 midPt;      // 中间点

            midPt   = (srcPos + destPos) / 2;
            midPt.y = 5;

            SimpleCurveAni curveAni = new SimpleCurveAni();

            m_numAniParal.addOneNumAni(curveAni);
            curveAni.setGO(m_mazePlayer.selfGo);
            curveAni.setTime(sTime);
            curveAni.setPlotCount(3);
            curveAni.addPlotPt(0, srcPos);
            curveAni.addPlotPt(1, midPt);
            curveAni.addPlotPt(2, destPos);
            curveAni.setAniEndDisp(onMove2DestEnd);

            curveAni.setEaseType(iTween.EaseType.easeInExpo);

            m_numAniParal.play();
        }
예제 #3
0
        protected void buildPathPt6f(int pathIdx)
        {
            MazePtBase pt   = null;
            string     path = "";

            for (int idx = 0; idx < 6; ++idx)
            {
                if (0 == idx)
                {
                    pt = new MazeStartPt();
                }
                else if (3 == idx)
                {
                    pt = new MazeEndPt();
                }
                else if (4 == idx)
                {
                    pt = new MazeBombPt();
                }
                else if (5 == idx)
                {
                    pt = new MazeDiePt();
                }
                else
                {
                    pt = new MazeComPt();
                }
                m_ptListArr[pathIdx].Add(pt);

                path   = string.Format("WayPt_{0}{1}", pathIdx, idx);
                pt.pos = UtilApi.TransFindChildByPObjAndPath(this.selfGo, path).transform.localPosition;
            }
        }
예제 #4
0
        protected MazePtBase createWayPtByGo(int pathIdx, int idx, string suffix)
        {
            MazePtBase pt   = null;
            string     path = "";
            GameObject go_  = null;

            path = string.Format("WayPt_{0}{1}{2}", pathIdx, idx, suffix);
            go_  = UtilApi.TransFindChildByPObjAndPath(this.selfGo, path);
            if (null != go_)
            {
                if ("_Start" == suffix)
                {
                    pt = new MazeStartPt();
                }
                else if ("_Start_Jump" == suffix)
                {
                    pt = new MazeStartJumpPt();
                }
                else if ("_Start_Show" == suffix)
                {
                    pt = new MazeStartShowPt();
                }
                else if ("_Start_Door" == suffix)
                {
                    pt = new MazeStartDoorPt();
                }
                else if ("_End" == suffix)
                {
                    pt = new MazeEndPt();
                }
                else if ("_End_Jump" == suffix)
                {
                    pt = new MazeEndJumpPt();
                }
                else if ("_End_Hide" == suffix)
                {
                    pt = new MazeEndHidePt();
                }
                else if ("_End_Door" == suffix)
                {
                    pt = new MazeEndDoorPt();
                }
                else if ("_End_Die" == suffix)
                {
                    pt = new MazeEndDiePt();
                }
                else
                {
                    pt = new MazeComPt();
                }

                pt.pos = go_.transform.localPosition;
            }

            return(pt);
        }
예제 #5
0
        protected MazePtBase createWayPtByGo(int pathIdx, int idx, string suffix)
        {
            MazePtBase pt = null;
            string path = "";
            GameObject go_ = null;

            path = string.Format("WayPt_{0}{1}{2}", pathIdx, idx, suffix);
            go_ = UtilApi.TransFindChildByPObjAndPath(this.selfGo, path);
            if (null != go_)
            {
                if ("_Start" == suffix)
                {
                    pt = new MazeStartPt();
                }
                else if ("_Start_Jump" == suffix)
                {
                    pt = new MazeStartJumpPt();
                }
                else if ("_Start_Show" == suffix)
                {
                    pt = new MazeStartShowPt();
                }
                else if ("_Start_Door" == suffix)
                {
                    pt = new MazeStartDoorPt();
                }
                else if ("_End" == suffix)
                {
                    pt = new MazeEndPt();
                }
                else if ("_End_Jump" == suffix)
                {
                    pt = new MazeEndJumpPt();
                }
                else if ("_End_Hide" == suffix)
                {
                    pt = new MazeEndHidePt();
                }
                else if ("_End_Door" == suffix)
                {
                    pt = new MazeEndDoorPt();
                }
                else if ("_End_Die" == suffix)
                {
                    pt = new MazeEndDiePt();
                }
                else
                {
                    pt = new MazeComPt();
                }

                pt.pos = go_.transform.localPosition;
            }

            return pt;
        }
예제 #6
0
        protected void buildPathPt6f(int pathIdx)
        {
            MazePtBase pt = null;
            string path = "";

            for (int idx = 0; idx < 6; ++idx)
            {
                if (0 == idx)
                {
                    pt = new MazeStartPt();
                }
                else if (3 == idx)
                {
                    pt = new MazeEndPt();
                }
                else if (4 == idx)
                {
                    pt = new MazeBombPt();
                }
                else if (5 == idx)
                {
                    pt = new MazeDiePt();
                }
                else
                {
                    pt = new MazeComPt();
                }
                m_ptListArr[pathIdx].Add(pt);

                path = string.Format("WayPt_{0}{1}", pathIdx, idx);
                pt.pos = UtilApi.TransFindChildByPObjAndPath(this.selfGo, path).transform.localPosition;
            }
        }