Ejemplo n.º 1
0
        private void CreatLane(string name, Transform parent, Vector3 posS, Vector3 posE, Vector3 handleS, Vector3 handleE)
        {
            GameObject lineObj = new GameObject(name);

            lineObj.transform.SetParent(parent);
            Lane lane = lineObj.AddComponent <Lane>();

            lane.bZ        = lineObj.AddComponent <BezierCurve>();
            lane.isReverse = false;
            lane.Init(posS, posE, handleS.normalized * 3, handleE.normalized * 3);
        }
Ejemplo n.º 2
0
        private void CreatLane(string name, Transform parent, bool isRe)
        {
            GameObject lineObj = new GameObject(name);

            lineObj.transform.SetParent(parent);
            Lane lane = lineObj.AddComponent <Lane>();

            lane.bZ        = lineObj.AddComponent <BezierCurve>();
            lane.isReverse = isRe;
            lane.Init(bZPoints.Length);
            LaneArr.Add(lane);
        }