// Use this for initialization void Start() { TTUIPage.ShowPage <UITopBar>(); TTUIPage.ShowPage <UIMainPage>(); // var root = TTUIRoot.Instance; }
//public Texture co_texture; //public string co_name; public override void Awake(GameObject go) { this.transform.Find("ConfigB").GetComponent <Button>().onClick.AddListener(Config); this.transform.Find("ExitB").GetComponent <Button>().onClick.AddListener(Hide); this.transform.Find("ExitB").GetComponent <Button>().onClick.AddListener(delegate(){ TTUIPage.ShowPage <UIMainPage>(); }); left_panel = this.transform.Find("LeftPanel/Scroll View").gameObject; left_bu = left_panel.transform.Find("Viewport/Content/Button").gameObject; down_panel = this.transform.Find("DownPanel/Scroll View").gameObject; down_panel_items = down_panel.transform.Find("Viewport/Content/DPanelitem").gameObject; //down_panel.AddComponent<Contentsize>(); //dropd = this.transform.Find("UPPanel/Sort/SortDropdown").GetComponent<Dropdown>(); //dropd.onValueChanged.AddListener(OnValueChange); //testtext = this.transform.Find("UPPanel/InputFieldSearch").GetComponentInChildren<Text>(); //dropd.AddOptions(inside); }
// Use this for initialization void Start() { TTUIPage.ShowPage <MainPanel>(); }
public bool CheckIfNeedBack(TTUIPage page) { return(page != null && page.CheckIfNeedBack()); }
public static void showbag() { // AssetDatabase.Refresh(); //Save.SaveGoods(); //Analysis.GoodsAnalysis(); //Analysis.GoodsAnalysis(); GameObject pa = GameObject.Find("BagPanel(Clone)").transform.GetChild(1).GetChild(0).gameObject; for (int i = 0; i < Save.Goodlist.Count; i++) { if (Save.Goodlist[i].Num > 0) { DataMgr.Item tt1 = DataMgr.GetInstance().GetItemID(Save.Goodlist[i].Id); GameObject ga = GameObject.Instantiate(Resources.Load <GameObject>("bagga")); Debug.Log(Save.Goodlist.Count); ga.transform.SetParent(pa.transform.GetChild(i)); // ga.transform.position = ga.transform.parent.transform.position; ga.transform.localScale = Vector3.one; ga.transform.localPosition = new Vector3(0f, 0, 0); ga.transform.GetChild(0).GetComponent <Image>().sprite = Resources.Load <Sprite>(tt1.item_Img); ga.transform.GetChild(1).GetComponent <Text>().text = Save.Goodlist[i].Num.ToString(); ga.transform.GetChild(0).GetComponent <Button>().onClick.AddListener(() => { TTUIPage.ShowPage <ttttt>(tt1); }); ga.transform.GetComponent <Button>().onClick.AddListener(() => TTUIPage.ShowPage <ttttt>(Save.Goodlist[i])); } }// }
// Use this for initialization void Start() { TTUIPage.ShowPage <UITopBar>(); TTUIPage.ShowPage <UIMainPage>(); }
public void ShowPage(string pageName, TTUIPage pageInstance, Action callback, object pageData) { ShowPage(pageName, pageInstance, callback, pageData, true); }
public void ShowPage(string pageName, TTUIPage pageInstance) { ShowPage(pageName, pageInstance, null, null, false); }
public void ShowPage(string pageName, TTUIPage pageInstance, object pageData) { ShowPage(pageName, pageInstance, null, pageData, false); }
private void OnClickShowIssuePanel() { // TTUIPage.ShowPage<UIIssuePanel>("871714"); TTUIPage.ShowPage <UIIssuePanel>(componentId); }
public override void DoThings(object sender, EventArgs e) { switch (LocalStep) { case 3001001: FirstPersonController.Instance.GetComponent <FirstPersonController>().enabled = false; TTUIPage.ShowPage <UITitle>(); //TTUIPage.ShowPage<UIIntroduceBtn>(); TTUIPage.ShowPage <UITip>(); UITip.Instance.SetTip("点击墙上高亮的安全守则查看相关内容。"); CamOperator.Instance.GetComponent <CamOperator>().enabled = false; break; case 3001002: Dianyaolu.Instance.GetComponent <Collider>().enabled = false; Dianyaolu.Instance.GetComponent <HighlightingSystem.Highlighter>().enabled = false; TTUIPage.ClosePage <UIIntroduceBtn>(); SetStep(3002001); //1002001 break; case 3002001: TTUIPage.ShowPage <UICProcess>(); TTUIPage.ShowPage <UIKou>(); TTUIPage.ClosePage <UIIntroduce>(); UITitle.Instance.SetPage(2); UITitle.Instance.transform.Find("StartBtn").gameObject.SetActive(false); FirstPersonController.Instance.GetComponent <FirstPersonController>().enabled = false; CamOperator.Instance.GetComponent <CamOperator>().enabled = true; CamOperator.Instance.cam.GetComponent <Camera>().depth = 1; transform.GetComponent <InputListener>().cam = CamOperator.Instance.cam.GetComponent <Camera>(); CamOperator.Instance.target.gameObject.SetActive(true); CamOperator.Instance.GetComponent <CamOperator>().enabled = false; break; case 3002002: TTUIPage.ClosePage <UIKou>(); FirstPersonController.Instance.GetComponent <FirstPersonController>().enabled = true; CamOperator.Instance.GetComponent <CamOperator>().enabled = false; UICProcess.Instance.SetPage(2); CamOperator.Instance.target.gameObject.SetActive(false); CamOperator.Instance.cam.GetComponent <Camera>().depth = -1; transform.GetComponent <InputListener>().cam = Camera.main; TTUIPage.ShowPage <UITip>(); UITip.Instance.SetTip("点击取下两个阀门,点击打开电窑炉门,拉出窑车。"); break; case 3002003: //UITip.Instance.SetTip("点击马蹄柱,先在窑车四个角各立一根马蹄柱。"); LocalStepAdd(); break; case 3002004: UITip.Instance.SetTip("点击硼板,将硼板平铺在窑车上。"); break; case 3002005: UITip.Instance.SetTip("点击马蹄柱,先在一层硼板四个角各立一根马蹄柱。"); break; case 3002006: UITip.Instance.SetTip("点击坭兴陶坯品,将坭兴陶坯品平铺在窑车上,第一层摆放完毕。"); break; case 3002007: UITip.Instance.SetTip("点击硼板,将硼板平铺在四个马蹄柱上。"); break; case 3002008: UITip.Instance.SetTip("点击马蹄柱,先在二层硼板四个角各立一根马蹄柱。"); break; case 3002009: UITip.Instance.SetTip("点击坭兴陶坯品,将坭兴陶坯品平铺在窑车上,第二层摆放完毕。"); break; case 3002010: UITip.Instance.SetTip("点击硼板,将硼板平铺在四个马蹄柱上。"); break; case 3002011: UITip.Instance.SetTip("点击坭兴陶坯品,将坭兴陶坯品平铺在窑车上,第三层摆放完毕。"); break; case 3002012: UITip.Instance.SetTip("点击窑车,将窑车推回电窑炉,关闭炉门。"); break; case 3002013: TTUIPage.ClosePage <UITip>(); SetStep(3003001); break; case 3003001: UICProcess.Instance.SetPage(3); TTUIPage.ShowPage <UITip>(); UITip.Instance.SetTip("请前往电窑左侧,将墙上开关通电。"); break; case 3003002: UITip.Instance.SetTip("点击电窑控制面板,设定坭兴陶烧制升温曲线。"); break; case 3003003: TTUIPage.ClosePage <UITip>(); TTUIPage.ShowPage <UISetValue>(); break; case 3003004: TTUIPage.ClosePage <UISetValue>(); SetStep(3004001); break; case 3004001: UICProcess.Instance.SetPage(4); //UITip.Instance.SetTip("点击开关,关闭电源"); //TTUIPage.ShowPage<UITip>(); //UITip.Instance.SetTip("升温过程。"); TTUIPage.ShowPage <UISlider>(); UISlider.Instance.Wait("升温过程,等待12小时"); AudioManager.instance.StopAudio(); AudioManager.instance.PlayAudio(Resources.Load <AudioClip>("Audio/Burn")); break; case 3004002: AudioManager.instance.StopAudio(); TTUIPage.ClosePage <UISlider>(); TTUIPage.ShowPage <UITip>(); UITip.Instance.SetTip("进入窑变技艺环节,点击带上防毒面具。"); break; case 3004003: UITip.Instance.SetTip("进入窑变技艺环节,点击海盐,从投料口向炉内投入海盐。"); break; case 3004004: TTUIPage.ClosePage <UITip>(); TTUIPage.ShowPage <UIQuestion>(); UIQuestion.Instance.GetQuestion(3004004); UIManager.Instance.Delay(QuestionEnd()); break; case 3004005: ShaderColorController.Instance.Burn(); ShaderColorController.Instance.fireLight.intensity = 3; TTUIPage.ShowPage <UITip>(); TTUIPage.ShowPage <UISingleBtn>(); UISingleBtn.Instance.transform.Find("EffectBtn").gameObject.SetActive(true); UISingleBtn.Instance.transform.Find("PaiyankouBtn").gameObject.SetActive(false); UITip.Instance.SetTip("点击炉内效果按钮,可查看窑内陶瓷烧制动态效果。"); UIManager.Instance.Delay(Openpaiyankou()); break; case 3004006: TTUIPage.ShowPage <UITip>(); UITip.Instance.SetTip("请关闭电源,开启降温环节。"); break; case 3004007: Fire.Instance.ChangeInFire(false); Fire.Instance.ChangeOutFire(false); //UITip.Instance.SetTip("开启排烟口、观火口、投料口,进入降温环节。"); TTUIPage.ClosePage <UITip>(); ShaderColorController.Instance.Cool(); TTUIPage.ShowPage <UISlider>(); UISlider.Instance.Wait("降温阶段,等待24小时"); break; case 3004008: TTUIPage.ClosePage <UISingleBtn>(); TTUIPage.ClosePage <UISlider>(); TTUIPage.ShowPage <UIQuestion>(); UIQuestion.Instance.GetQuestion(1004007); UIManager.Instance.Delay(QuestionEnd()); break; case 3004009: Lumen.Instance.gameObject.SetActive(true); SetStep(3005001); break; case 3005001: UICProcess.Instance.SetPage(5); TTUIPage.ShowPage <UITip>(); UITip.Instance.SetTip("点击戴上手套。"); break; case 3005002: UITip.Instance.SetTip("点击取下两个阀门,点击打开电窑炉门,拉出窑车。"); break; case 3005003: UITip.Instance.SetTip("点击取下最上层烧制好的坭兴陶。"); break; case 3005004: UITip.Instance.SetTip("点击取下最上层硼板。"); break; case 3005005: UITip.Instance.SetTip("点击取下第二层马蹄柱。"); break; case 3005006: UITip.Instance.SetTip("点击取下第二层烧制好的坭兴陶。"); break; case 3005007: UITip.Instance.SetTip("点击取下第二层硼板。"); break; case 3005008: UITip.Instance.SetTip("点击取下最下层马蹄柱。"); break; case 3005009: UITip.Instance.SetTip("点击取下最下层烧制好的坭兴陶。"); break; case 3005010: UITip.Instance.SetTip("点击取下最下层硼板。"); break; case 3005011: //UITip.Instance.SetTip("点击取下最下层马蹄柱。"); LocalStepAdd(); break; case 3005012: UITip.Instance.SetTip("点击窑车,关闭电窑炉。"); break; case 3005013: UITitle.Instance.SetPage(3); TTUIPage.ClosePage <UICProcess>(); UITip.Instance.SetTip("点击烧制好的坭兴陶,显示要变效果图。"); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = true; } break; case 3005014: TTUIPage.ClosePage <UITip>(); SetStep(3006001); break; case 3006001: UITitle.Instance.SetPage(4); TTUIPage.ClosePage <UIPicture>(); TTUIPage.ShowPage <UIEnd>(); UIEnd.Instance.transform.GetComponent <Test>().ShowScore(); break; default: break; } }
public override void Awake(GameObject go) { base.Awake(go); okButton = GameObject.Find("Buttonok").GetComponent <Button>(); okButton.onClick.AddListener(() => { TTUIPage.ClosePage <TipePanel>(); }); }
private static bool CheckIfNeedBack(TTUIPage page) { return page != null && page.CheckIfNeedBack(); }
private void OnDestroy() { TTUIPage.ClearNodes(); }
// Use this for initialization void Start() { TTUIPage.ShowPage <Character>(); }
/// <summary> /// Async Show Page with Async loader bind in 'TTUIBind.Bind()' /// </summary> public void ShowPage(string pageName, TTUIPage pageInstance, Action callback) { ShowPage(pageName, pageInstance, callback, null, true); }
public void SaveAll() { //如果匹配没有完成,提醒用户,不能上传 List <int> notcheckinglist = CheckAllMatchDone(); if (notcheckinglist.Count > 0) { StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < notcheckinglist.Count; i++) { stringBuilder.Append(" " + Tool.NumberToChar(notcheckinglist[i] + 1) + " "); } string _strs = MSGCenter.FormatMessage("第<color=red>" + stringBuilder.ToString() + "</color>组未匹配", "3"); TTUIPage.ShowPage <UINotice>(_strs); return; } int currentillnessdataid = PlayerDataCenter.Currentillnessdata.ID; string url = Tool.refreshillnessdatasimplepath + currentillnessdataid; MyWebRequest.Instance.Get(Tool.requestdetailillnessdatapath + currentillnessdataid, (success, str) => { bool hasvalue = false; if (success) { hasvalue = JsonHelper.ChackMatchingHasValue(str); string _url = ""; string _message = ""; if (hasvalue) { int pointid = JsonHelper.GetPointID(str); //更新旧的 _url = Tool.refreshmathcingpointpath + pointid; _message = JsonHelper.MergMatchingpointChangeNeed(PlayerDataCenter.Currentillnessdata); MyWebRequest.Instance.Put(_url, _message, (suc, ss) => { TTUIPage.ShowPage <UINotice>(Tool.DownloadDir + ss); if (suc) { //解析路径 string downloadurlsjson = JsonHelper.ParseJsonToNeed(str, Tool.datakey, Tool.PieceProtectorURLkey); DownloadSave(downloadurlsjson); TTUIPage.ClosePage <UINotice>(); } }); } else { //添加新的 _url = Tool.addmatchingpointspath; MyWebRequest.Instance.Post(_url, JsonHelper.MergMatchingpointChangeNeed(PlayerDataCenter.Currentillnessdata), (_suc, _str) => { TTUIPage.ShowPage <UINotice>(Tool.DownloadDir + _str); if (_suc) { //解析路径 string downloadurlsjson = JsonHelper.ParseJsonToNeed(str, str, Tool.datakey, Tool.PieceProtectorURLkey); DownloadSave(downloadurlsjson); TTUIPage.ClosePage <UINotice>(); } }); } } }); }
public override void OnMouseLeftClick() { switch (UIManager.Instance.step) { #region 统 case 1001001: //TTUIPage.ShowPage<UIIntroduce>(); //UIIntroduce.Instance.ChangeInfo(introduction, info, "Peipin"); //foreach (GameObject item in ChuantongStep.Instance.peipin) //{ // item.GetComponent<HighlightingSystem.Highlighter>().tween = false; //} break; case 1002006: if (layer == TaociLayer.Bottom && b == true) { Push(0); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 1002009: if (layer == TaociLayer.Center && b == true) { Push(1); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 1002011: if (layer == TaociLayer.Top && b == true) { Push(2); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 1005003: if (layer == TaociLayer.Top) { Pull(); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 1005006: if (layer == TaociLayer.Center) { Pull(); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 1005009: if (layer == TaociLayer.Bottom) { Pull(); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 1005013: foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; item.GetComponent <Collider>().enabled = false; } TTUIPage.ShowPage <UIPicture>(); UIPicture.Instance.SetImg(sprite); break; #endregion #region 电柴 case 2001001: //TTUIPage.ShowPage<UIIntroduce>(); //UIIntroduce.Instance.ChangeInfo(introduction, info, "Peipin"); //foreach (GameObject item in DianchaiStep.Instance.peipin) //{ // item.GetComponent<HighlightingSystem.Highlighter>().tween = false; //} break; case 2002007: if (layer == TaociLayer.Bottom && b == true) { Push(0); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 2002010: if (layer == TaociLayer.Center && b == true) { Push(1); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 2002012: if (layer == TaociLayer.Top && b == true) { Push(2); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 2005003: if (layer == TaociLayer.Top) { Pull(); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 2005006: if (layer == TaociLayer.Center) { Pull(); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 2005009: if (layer == TaociLayer.Bottom) { Pull(); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 2005013: foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; item.GetComponent <Collider>().enabled = false; } TTUIPage.ShowPage <UIPicture>(); UIPicture.Instance.SetImg(sprite); break; #endregion #region 盐烧 case 3001001: //TTUIPage.ShowPage<UIIntroduce>(); //UIIntroduce.Instance.ChangeInfo(introduction, info, "Peipin"); //foreach (GameObject item in ChuantongStep.Instance.peipin) //{ // item.GetComponent<HighlightingSystem.Highlighter>().tween = false; //} break; case 3002006: if (layer == TaociLayer.Bottom && b == true) { Push(0); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 3002009: if (layer == TaociLayer.Center && b == true) { Push(1); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 3002011: if (layer == TaociLayer.Top && b == true) { Push(2); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 3005003: if (layer == TaociLayer.Top) { Pull(); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 3005006: if (layer == TaociLayer.Center) { Pull(); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 3005009: if (layer == TaociLayer.Bottom) { Pull(); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 3005013: foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; item.GetComponent <Collider>().enabled = false; } TTUIPage.ShowPage <UIPicture>(); UIPicture.Instance.SetImg(sprite); break; #endregion #region 定点 case 4001001: //TTUIPage.ShowPage<UIIntroduce>(); //UIIntroduce.Instance.ChangeInfo(introduction, info, "Peipin"); //foreach (GameObject item in ChuantongStep.Instance.peipin) //{ // item.GetComponent<HighlightingSystem.Highlighter>().tween = false; //} break; case 4002005: if (layer == TaociLayer.Bottom && b == true) { Push(0); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 4002009: if (layer == TaociLayer.Center && b == true) { Push(1); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 4002012: if (layer == TaociLayer.Top && b == true) { Push(2); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 4005004: if (layer == TaociLayer.Top) { Pull(); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 4005008: if (layer == TaociLayer.Center) { Pull(); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 4005012: if (layer == TaociLayer.Bottom) { Pull(); foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; } } break; case 4005015: foreach (GameObject item in peipin) { item.GetComponent <HighlightingSystem.Highlighter>().tween = false; item.GetComponent <Collider>().enabled = false; } TTUIPage.ShowPage <UIPicture>(); UIPicture.Instance.SetImg(sprite); break; #endregion default: break; } }