-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSSSLoadableResource.cs
More file actions
42 lines (37 loc) · 1.05 KB
/
SSSLoadableResource.cs
File metadata and controls
42 lines (37 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
namespace SSSoftcoded
{
public class SSSLoadableResource
{
private string _name = "";
//Extension to find the file at. Contains the '.'
//A blank extension means the asset is internal. This is only used for wallpapers currently.
private string _extension = "";
public SSSLoadableResource(string name, string extension)
{
_name = name;
_extension = extension;
if (_extension != "" && !_extension.StartsWith("."))
{
_extension = "." + _extension;
}
}
public SSSLoadableResource(string filePath)
{
_extension = filePath.Substring(filePath.LastIndexOf("."));
_name = SSSLoadingHelper.IsolateFileName(filePath);
}
public string GetName()
{
return _name;
}
public string GetExtension()
{
return _extension;
}
public string GetAddress()
{
return _name + _extension;
}
}
}