private void SetupTool() { _markSeatPos = _seat.anchoredPosition; _model.Init(); _pageView.Init(); _scissors.Init(_model); _grower.Init(_model); _markGrowerPos = _grower.GetComponent <RectTransform>().anchoredPosition; _bubble.Init(_model); _markBubblePos = _bubble.GetComponent <RectTransform>().anchoredPosition; _shaverRound.Init(_model); _shaverSharp.Init(_model); _scraper.Init(_model); _razor.Init(_model); _forceps.Init(_model); _bandage.Init(_model); _unguent.Init(_model); _cream.Init(_model); _dyeRed.Init(_model); _dyeGreen.Init(_model); _dyeBlue.Init(_model); _dyePurple.Init(_model); SetCheckToolDrag(true); //Facade.Instance.SendMessageCommand(NotiConst.BEARD_END, ""); _faceRed.Init(_model); _faceScar.Init(_model); _model.StartEmotion(); //int debugIndex = 3; //StartCoroutine(GoDebug(debugIndex)); }
// Start is called before the first frame update private void Start() { model.Init(); view.Init(model); turnOverTime = 0.3f; }
public void setNoticeThree(List <NoticeThreeEntity> lst) { if (lst == null) { return; } if (m_imgContent == null) { return; } for (int i = 0; i < m_noticethree.Count; ++i) { UIPoolManager.Instance.Despawn(m_noticethree[i].transform); } for (int i = 0; i < m_pageview.toggleArray.Count; i++) { UIPoolManager.Instance.Despawn(m_pageview.toggleArray[i].transform); } m_pageview.toggleArray.Clear(); m_noticethree.Clear(); UIItemNoticeThree page = null; Toggle itemToggle = null; for (int i = 0; i < lst.Count; ++i) { GameObject imgItem = UIPoolManager.Instance.Spawn("UIItemNoticeThree").gameObject; GameObject pointItem = UIPoolManager.Instance.Spawn("UIItemNoticeThreePoint").gameObject; imgItem.SetParent(m_imgContent); pointItem.SetParent(m_pointContent); page = imgItem.GetComponent <UIItemNoticeThree>(); itemToggle = pointItem.GetComponent <Toggle>(); itemToggle.group = m_pointContent.gameObject.GetComponent <ToggleGroup>(); if (i == 0) { itemToggle.isOn = true; } else { itemToggle.isOn = false; } //第五步添加回调参数 page.SetUI(lst[i].id, lst[i].link_url, lst[i].img_url, lst[i].content, OnClickCallBack, OnClickTextureCallBack); if (!WeChatNumber.ContainsKey(lst[i].id)) { WeChatNumber.Add(lst[i].id, lst[i].content); } m_noticethree.Add(page); m_pageview.toggleArray.Add(itemToggle); } m_pageview.Init(m_noticethree); }
public void Start() { Left.onClick.AddListener(() => { pageView.NextPage(); }); Right.onClick.AddListener(() => { pageView.LastPage(); }); pageView.Init(); List <PageDataHandle> pages = new List <PageDataHandle>(); for (int i = 0; i < 40; i++) { var data = new PageDataHandle(); data.Init(); pages.Add(data); } pageView.AddPages(pages); }