예제 #1
0
파일: Path.cs 프로젝트: ctxdegithub/DoTween
//        // Deletes the previous waypoints and assigns the new ones, always cloning them
//        // (newWps length must be at least 1).
//        // Internal so DOTweenPathInspector can use it
//        internal void AssignWaypoints(List<Vector3> newWps)
//        {
//            int count = newWps.Count;
//            wps = new Vector3[count];
//            for (int i = 0; i < count; ++i) wps[i] = newWps[i];
//        }

        // Internal so DOTweenPathInspector and DOTweenPath can use it
        internal void AssignDecoder(PathType pathType)
        {
            type = pathType;
            switch (pathType)
            {
            case PathType.Linear:
                if (_linearDecoder == null)
                {
                    _linearDecoder = new LinearDecoder();
                }
                _decoder = _linearDecoder;
                break;

            case PathType.CubicBezier:
                if (_cubicBezierDecoder == null)
                {
                    _cubicBezierDecoder = new CubicBezierDecoder();
                }
                _decoder = _cubicBezierDecoder;
                break;

            default: // Catmull-Rom
                if (_catmullRomDecoder == null)
                {
                    _catmullRomDecoder = new CatmullRomDecoder();
                }
                _decoder = _catmullRomDecoder;
                break;
            }
        }
예제 #2
0
 public void AssignDecoder(PathType pathType)
 {
     this.type = pathType;
     if (pathType == PathType.Linear)
     {
         if (Path._linearDecoder == null)
         {
             Path._linearDecoder = new LinearDecoder();
         }
         this._decoder = Path._linearDecoder;
         return;
     }
     if (Path._catmullRomDecoder == null)
     {
         Path._catmullRomDecoder = new CatmullRomDecoder();
     }
     this._decoder = Path._catmullRomDecoder;
 }
예제 #3
0
 public void AssignDecoder(PathType pathType)
 {
     this.type = pathType;
     if (pathType == PathType.Linear)
     {
         if (_linearDecoder == null)
         {
             _linearDecoder = new LinearDecoder();
         }
         this._decoder = _linearDecoder;
     }
     else
     {
         if (_catmullRomDecoder == null)
         {
             _catmullRomDecoder = new CatmullRomDecoder();
         }
         this._decoder = _catmullRomDecoder;
     }
 }
예제 #4
0
파일: Path.cs 프로젝트: YYliss/DoTween-1
 internal void AssignDecoder(PathType pathType)
 {
     this.type = pathType;
     if (pathType == PathType.Linear)
     {
         if (Path._linearDecoder == null)
         {
             Path._linearDecoder = new LinearDecoder();
         }
         this._decoder = Path._linearDecoder;
     }
     else
     {
         if (Path._catmullRomDecoder == null)
         {
             Path._catmullRomDecoder = new CatmullRomDecoder();
         }
         this._decoder = Path._catmullRomDecoder;
     }
 }
예제 #5
0
파일: Path.cs 프로젝트: Grogal/dotween
//        // Deletes the previous waypoints and assigns the new ones, always cloning them
//        // (newWps length must be at least 1).
//        // Internal so DOTweenPathInspector can use it
//        internal void AssignWaypoints(List<Vector3> newWps)
//        {
//            int count = newWps.Count;
//            wps = new Vector3[count];
//            for (int i = 0; i < count; ++i) wps[i] = newWps[i];
//        }

        // Internal so DOTweenPathInspector and DOTweenPath can use it
        internal void AssignDecoder(PathType pathType)
        {
            type = pathType;
            switch (pathType) {
            case PathType.Linear:
                if (_linearDecoder == null) _linearDecoder = new LinearDecoder();
                _decoder = _linearDecoder;
                break;
            default: // Catmull-Rom
                if (_catmullRomDecoder == null) _catmullRomDecoder = new CatmullRomDecoder();
                _decoder = _catmullRomDecoder;
                break;
            }
        }