public void SetData(int godId, Action nextAction) { this.mNextAction = nextAction; this.mGodData = DataReader <Artifact> .Get(godId); if (this.mGodData != null) { if (UIManagerControl.Instance.IsOpen("TownUI") && this.mGodData.areaIndex == 5) { Transform transform = WidgetSystem.FindWidgetOnUI(this.mGodData.widgetId, true); if (transform != null) { transform.get_gameObject().SetActive(true); } TownUI.Instance.ForceOpenRightBottom(); } this.RefreshDesc(this.mGodData); this.mFxIconId = FXSpineManager.Instance.PlaySpine(3907, this.mRectIcon.get_transform(), "TownUI", 14001, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None); TimerHeap.AddTimer(500u, 0, delegate { this.mCanClick = true; }); Debug.Log("=====神器[" + godId + "]开放指导!!!====="); } else { this.ExecuteNext(); } }
public static bool IsWidgetActiveSelf(int widgetId) { Transform transform = WidgetSystem.FindWidgetOnUI(widgetId, true); return(!(transform == null) && transform.get_gameObject().get_activeSelf()); }
private static Transform GetWidget(int widgetId) { return(WidgetSystem.FindWidgetOnUI(widgetId, true)); }
public static bool GetTargetPosition(int areaId, int widgetId, ref Vector3 position, ref Vector2 offset) { offset = Vector2.get_zero(); TownUI instance = TownUI.Instance; if (instance == null) { Debug.LogError("TownUI is null"); return(false); } Transform transform = null; switch (areaId) { case 1: transform = instance.FindTransform("HeadIcon"); break; case 2: { transform = instance.FindTransform("ButtonsLeftBase"); int indexOfLeftMiddle = SystemOpenManager.GetIndexOfLeftMiddle(areaId); offset = new Vector2(0f, (float)(-(float)indexOfLeftMiddle * 110)); break; } case 3: transform = WidgetSystem.FindWidgetOnUI(widgetId, true); if (transform != null) { transform.get_gameObject().SetActive(true); } instance.SwitchTopRightButtonToShow(); break; case 5: transform = WidgetSystem.FindWidgetOnUI(widgetId, true); if (transform != null) { transform.get_gameObject().SetActive(true); } instance.ForceOpenRightBottom(); break; case 6: transform = instance.FindTransform("BigFight"); break; case 7: instance.CloseRightMoreButton(); transform = instance.FindTransform("DailyTask"); break; case 8: transform = instance.FindTransform("GodWeaponButton"); break; } if (transform == null) { Debug.LogError(string.Concat(new object[] { "指导目标为空!!!区域:", areaId, ", 组件:", widgetId })); return(false); } position = transform.get_position(); Debug.Log(string.Concat(new object[] { "指导目标:", transform.get_gameObject().get_name(), ", 坐标:", position })); return(true); }