Scriptum/Assets/Scripts/REFACTORING/Application/Shared/PathBuilder.cs

55 lines
1.1 KiB
C#
Raw Normal View History

2022-10-22 18:04:21 +02:00
using System.IO;
using UnityEngine;
public class PathBuilder
{
private static string Path;
private string STATIC_ELEMENT_LOCATION { get { return "/StaticElements/"; } }
private string DYNAMIC_ELEMENT_LOCATION { get { return "/DynamicElements/"; } }
public PathBuilder BuildSavePath()
{
Path = Application.persistentDataPath + "/";
return this;
}
public PathBuilder WithMap(string map = "")
{
Path += map;
return this;
}
public PathBuilder WithDataType(SceneElementTypeEnum elementTypeEnum)
{
switch (elementTypeEnum)
{
case SceneElementTypeEnum.None:
{
Path += "/";
break;
}
case SceneElementTypeEnum.Dynamic:
{
Path += "/DynamicElements/";
break;
}
case SceneElementTypeEnum.Static:
{
Path += "/StaticElements/";
break;
}
}
return this;
}
public string GetString()
{
return Path;
}
}