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; }
public void Add (Graphic graphic, string name="") { if (name == "") { name = graphic.name; } dictionary.Add (name, graphic); }