示例#1
0
			public Graphic Get (string path, Def def, bool skipCreateNew =false)
			{
				object val = null;
				dictionary.TryGetValue (path, out val);
				Graphic value = (Graphic)val;
				if (value == null && !skipCreateNew) {
					value = new Graphic (def.GetAttribute ("TextureID"));
				}
				return value;
			}
示例#2
0
			public void Add (Graphic graphic, string name="")
			{
				if (name == "") {
					name = graphic.name;
				}
				dictionary.Add (name, graphic);
			}