(7ee8dbc11) v0.9.8.0
This commit is contained in:
@@ -118,6 +118,10 @@ namespace Barotrauma
|
||||
|
||||
for (int i = 0; i < subDirs.Length; i++)
|
||||
{
|
||||
if (i == subDirs.Length - 1 && string.IsNullOrEmpty(subDirs[i]))
|
||||
{
|
||||
break;
|
||||
}
|
||||
string enumPath = string.IsNullOrEmpty(filename) ? "./" : filename;
|
||||
List<string> filePaths = Directory.GetFileSystemEntries(enumPath).Select(s => Path.GetFileName(s)).ToList();
|
||||
if (filePaths.Any(s => s.Equals(subDirs[i], StringComparison.Ordinal)))
|
||||
@@ -571,5 +575,19 @@ namespace Barotrauma
|
||||
#endif
|
||||
return path;
|
||||
}
|
||||
|
||||
public static float GetEasing(TransitionMode easing, float t)
|
||||
{
|
||||
return easing switch
|
||||
{
|
||||
TransitionMode.Smooth => MathUtils.SmoothStep(t),
|
||||
TransitionMode.Smoother => MathUtils.SmootherStep(t),
|
||||
TransitionMode.EaseIn => MathUtils.EaseIn(t),
|
||||
TransitionMode.EaseOut => MathUtils.EaseOut(t),
|
||||
TransitionMode.Exponential => t * t,
|
||||
TransitionMode.Linear => t,
|
||||
_ => t,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user