Esempio n. 1
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;
            }
        }
Esempio n. 2
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);
        }
Esempio n. 3
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;
        }
 // 移动到结束点
 public void moveToDestPos(MazeEndPt pt_)
 {
     moveToNextPos(pt_);
 }
Esempio n. 5
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;
            }
        }
Esempio n. 6
0
 // 移动到结束点
 public void moveToDestPos(MazeEndPt pt_)
 {
     moveToNextPos(pt_);
 }