示例#1
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);
        }
示例#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;
        }
 public void moveToDestPos(MazeEndDoorPt pt_)
 {
     moveToNextPos(pt_);
 }
示例#4
0
 public void moveToDestPos(MazeEndDoorPt pt_)
 {
     moveToNextPos(pt_);
 }