コード例 #1
0
		private static void MakeDefaultAtlas ()
		{
			DefaultAtlas = new SpriteAtlas (TileSize, "DefaultAtlas");
			List<Texture2D> tempList = new List<Texture2D> ();
			tempList.Add (ClearTexture);
			DefaultAtlas.AddTextureList (tempList);
		}
コード例 #2
0
		private static void PopulateDictionaries ()
		{
			Debug.Log ("----Start Texture List Fill----");
			foreach (string cat in textureCategories) {
				List<Texture2D> curTexList = Finder.textureDatabase.GetTexturesOfType (cat);
				textures.Add (cat, curTexList);
				Debug.Log (textures [cat].Count + " " + cat + "s found");
				int maxWidth = 1;
				foreach (Texture2D tex in curTexList) {
					if (tex.width > maxWidth) {
						maxWidth = tex.width;
					}
				}
				SpriteAtlas curSpriteAtlas = new SpriteAtlas (maxWidth, cat + "Atlas");
				curSpriteAtlas.AddTextureList (curTexList);
				spriteAtlases.Add (cat, curSpriteAtlas);
				curSpriteAtlas.Init ();
			}
			Debug.Log ("----End Texture List Fill----");
		}