Scriptum/Assets/Scripts/REFACTORING/Application/Shared/PathBuilder.cs
2022-11-06 20:46:25 +01:00

55 lines
1.1 KiB
C#

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