1using System.Collections.Generic;
26 public CanvasGroup
cg;
38 public Dictionary<string, Sprite>
dictSprite =
new Dictionary<string, Sprite>();
87 Object.DestroyImmediate(
Instance.gameObject);
100 Object.Destroy(value.texture);
101 Object.Destroy(value);
113 partial.allowRotate = on;
118 partial.ignoreBlock = on;
132 am.partialMap.name = a.
name;
136 string path = a.
path.GetFullFileNameWithoutExtension() +
".txt";
137 if (File.Exists(path))
139 string str = File.ReadAllText(path);
145 if (a.
name.IsEmpty())
154 string path2 = a.
path.GetFullFileNameWithoutExtension() +
".jpg";
155 if (File.Exists(path2))
157 Texture2D texture2D =
new Texture2D(1, 1);
158 byte[] source = File.ReadAllBytes(path2);
159 texture2D.LoadImage(source.ToArray());
160 sprite = Sprite.Create(texture2D,
new Rect(0f, 0f, texture2D.width, texture2D.height),
new Vector2(0.5f, 0.5f));
161 b.icon.sprite = sprite;
167 b.icon.sprite = sprite;
169 UIButton componentInDirectChildren = b.GetComponentInDirectChildren<
UIButton>();
170 componentInDirectChildren.SetActive(
IsEditor);
171 componentInDirectChildren.SetOnClick(delegate
174 am.overwritePath = a.
path;
182 if (
item.Name.EndsWith(
".mp"))
185 if (metaData !=
null && metaData.
partial !=
null)
212 onClick = delegate(DirectoryInfo a,
UIButton b)
228 onInstantiate = delegate(DirectoryInfo a,
UIButton b)
231 FileInfo[] files = a.GetFiles(
"*.mp", SearchOption.AllDirectories);
232 for (
int j = 0; j < files.Length; j++)
237 b.mainText.text = ((a ==
dir && !isMain) ?
"(Root)" : (a.Name +
"(" + num +
")"));
242 DirectoryInfo[] array = (isMain ?
new DirectoryInfo(
CorePath.
MapPieceSave).GetDirectories() :
dir.GetDirectories());
243 foreach (DirectoryInfo o
in array)
void RefreshMenu(bool show)
static string MapPieceSaveUser
static string MapPieceSave
static string _currency(object a, string IDCurrency)
static List< FileInfo > listPartialMaps
static Dictionary< string, PartialMap > CacheMap
static MapMetaData GetMetaData(string pathZip)
override void Add(object o)
void Select(int index=0, bool invoke=false)
override void Add(object item)