// // 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; } }
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; }
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; } }
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; } }
// // 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; } }