コード例 #1
0
ファイル: Finder.cs プロジェクト: DanishKizilbash/Cosmos4X
			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
ファイル: Finder.cs プロジェクト: DanishKizilbash/Cosmos4X
			public void Add (Graphic graphic, string name="")
			{
				if (name == "") {
					name = graphic.name;
				}
				dictionary.Add (name, graphic);
			}