示例#1
0
        // Update is called once per frame
        //void Update()
        //{

        //}

        void SetupPath()
        {
            GameObject           pathRoot     = GameObject.Find("RootPath");
            List <CurveNodeData> pathDataList = new List <CurveNodeData>();



            Transform pathTrans = pathRoot.transform;

            for (int i = 0; i < pathTrans.childCount; ++i)
            {
                Transform     child = pathTrans.GetChild(i);
                CurveNodeData data  = new CurveNodeData();
                data.position = child.position;
                data.rotation = child.rotation;
                pathDataList.Add(data);
            }

            TrackManager.GetInstance().GenerateTrack(trackPrefab, pathDataList.ToArray());
        }
示例#2
0
        // Use this for initialization
        void Start()
        {
            TrackManager.GetInstance().Init(TrackNumDef.enTrackType.Curve);

            //SetupPath();
        }