public UI_PictureDetailedInfo LoadUI(int skillCount) { string path = string.Empty; if (skillCount == 1) { path = "UI/Picturebook/OneSkillStatus"; } else { path = "UI/Picturebook/TwoSkillStatus"; } GameObject original = AssetDataMng.Instance().LoadObject(path, null, true) as GameObject; GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(original); Transform transform = gameObject.transform; transform.parent = this.viewParentObject; transform.localPosition = Vector3.zero; transform.localRotation = Quaternion.identity; transform.localScale = Vector3.one; transform.name = "DetailedInfo"; UIWidget component = this.viewParentObject.GetComponent <UIWidget>(); DepthController.AddWidgetDepth_Static(transform, component.depth); return(gameObject.GetComponent <UI_PictureDetailedInfo>()); }
public static void AddWidgetDepth_Static(Transform tm, int add) { UIWidget component = tm.gameObject.GetComponent <UIWidget>(); if (component != null) { component.depth += add; } IEnumerator enumerator = tm.GetEnumerator(); try { while (enumerator.MoveNext()) { object obj = enumerator.Current; Transform tm2 = (Transform)obj; DepthController.AddWidgetDepth_Static(tm2, add); } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } }
public static void SetWidgetDepth_Static(Transform tm, int depth) { UIWidget component = tm.gameObject.GetComponent <UIWidget>(); if (component != null) { int add = depth - component.depth; DepthController.AddWidgetDepth_Static(tm, add); } }
public void Initialize(Transform parentObject, int iconSize, int depthOffset) { Transform transform = this.iconRootTransform; transform.parent = parentObject; transform.localScale = Vector3.one; transform.localPosition = Vector3.zero; MonsterIconTransform.SetSize(this.iconRootTransform, iconSize); DepthController.AddWidgetDepth_Static(transform, depthOffset); this.Thumbnail.Initialize(); }