36 lines
950 B
C#
36 lines
950 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using UnityEngine;
|
|
|
|
namespace GeneralTools
|
|
{
|
|
public class ResourcesStore
|
|
{
|
|
public static Dictionary<string, List<object>> resourceDict = new Dictionary<string, List<object>>();
|
|
public static void AddResource(string key, bool cover, params object[] resource)
|
|
{
|
|
key = Path.GetFullPath(key);
|
|
if (!cover && resourceDict.ContainsKey(key))
|
|
{
|
|
|
|
}
|
|
else
|
|
{
|
|
resourceDict[key] = new List<object>(resource);
|
|
}
|
|
}
|
|
public static List<object> GetResource(string key)
|
|
{
|
|
key = Path.GetFullPath(key);
|
|
if (resourceDict.ContainsKey(key))
|
|
{
|
|
return resourceDict[key];
|
|
}
|
|
else
|
|
{
|
|
return new List<object>();
|
|
}
|
|
}
|
|
}
|
|
} |