private static string GetFilePathByName(string mapName, PathDataType pathDataType) { switch (pathDataType) { case PathDataType.height: break; case PathDataType.trail: mapName = mapName + "_trails"; break; default: break; } #if UNITY_EDITOR return(Application.dataPath + "/StreamingAssets/" + mapName); #endif #if UNITY_IPHONE return(Application.dataPath + "/Raw/" + mapName); #endif #if UNITY_ANDROID return("jar:file://" + Application.dataPath + "!/assets/" + mapName); #endif #pragma warning disable CS0162 // Unreachable code detected return(mapName); #pragma warning restore CS0162 // Unreachable code detected }
public PathData(PathDataType type) { this.Type = type; if (type != PathDataType.PathClosePath) { Points = new Point[PointNumbers[(int)type]]; } else { Points = null; } }
public static PathDataType FromDTO(this DTO.PathDataType source) { var h = new PathDataType(); h.Path = source.Path; h.UserData = source.UserData; //h.Exclusion = source.Exclusion.ToList().ConvertAll(wld => wld.FromDTO()); //h.Inclusion = source.Inclusion.ToList().ConvertAll(wld => wld.FromDTO()); if (source.Exclusion != null) h.Exclusion = source.Exclusion.Select(wld => wld.FromDTO()).ToList(); if (source.Inclusion != null) h.Inclusion = source.Inclusion.Select(wld => wld.FromDTO()).ToList(); return h; }
public static DTO.PathDataType ToDTO(this PathDataType source) { var h = new DTO.PathDataType(); h.Path = source.Path; h.UserData = source.UserData; if (source.Exclusion != null) { h.Exclusion = source.Exclusion.ConvertAll(wld => wld.ToDTO()).ToArray(); } if (source.Inclusion != null) { h.Inclusion = source.Inclusion.ConvertAll(wld => wld.ToDTO()).ToArray(); } return(h); }
public static PathDataType FromDTO(this DTO.PathDataType source) { var h = new PathDataType(); h.Path = source.Path; h.UserData = source.UserData; //h.Exclusion = source.Exclusion.ToList().ConvertAll(wld => wld.FromDTO()); //h.Inclusion = source.Inclusion.ToList().ConvertAll(wld => wld.FromDTO()); if (source.Exclusion != null) { h.Exclusion = source.Exclusion.Select(wld => wld.FromDTO()).ToList(); } if (source.Inclusion != null) { h.Inclusion = source.Inclusion.Select(wld => wld.FromDTO()).ToList(); } return(h); }
/// <summary> /// Initializes a new instance of the <see cref="PathViewModel"/> class. /// </summary> public PathViewModel() { data = new PathDataType(); data.Path = "Moese, hehehe"; }
public PathData(PathDataType type) { this._type = type; }
/// <summary> /// Initializes a new instance of the <see cref="PathViewModel"/> class. /// </summary> /// <param name="path">The path.</param> public PathViewModel(PathDataType path) { this.data = path; }
public extern static uint CreatePath(PathFormat pathFormat, PathDataType datatype, float scale, float bias, int segmentCapacityHint, int coordCapacityHint, PathCapabilities capabilities);