void ResetGuaDian() { if (XH != null) { XHCtrl xhctrl = XH.GetComponent <XHCtrl>(); xhctrl.DestroyGuadian(); } //LSCtrl lsctrl = LS.GetComponent<LSCtrl>(); //lsctrl.DestroyGuadian(); }
public void Dispose() { //comUI.redoClickEvent -= OnReDo; //comUI.nextClickEvent -= OnNextDo; if (comUI == null) { comUI = UIManager.Instance.GetUI <CommonUI>("CommonUI"); } comUI.redoClickEvent -= OnReDo; comUI.nextClickEvent -= OnNextDo; if (xiaohuaAnim != null) { xiaohuaAnim.timePointEvent = null; xiaohuaAnim.OnContinue(); xiaohuaAnim.ClearCompleteEvent(); } if (fdlsAnim != null) { fdlsAnim.OnContinue(); fdlsAnim.timePointEvent = null; fdlsAnim.ClearCompleteEvent(); } if (LS != null) { LS.timePointEvent = null; LS.OnContinue(); LS.ClearCompleteEvent(); LSCtrl lsctrl = LS.GetComponent <LSCtrl>(); if (lsctrl != null) { lsctrl.DestroyGuadian(); } } XHCtrl xhctrl = xiaohuaAnim.GetComponent <XHCtrl>(); if (xhctrl != null) { xhctrl.DestroyGuadian(); } comUI = null; evtFinished = null; evtRedo = null; if (emptyRoot != null) { Destroy(emptyRoot); emptyRoot = null; } Destroy(gameObject); }
public void Dispose() { if (comUI == null) { comUI = UIManager.Instance.GetUI <CommonUI>("CommonUI"); } comUI.redoClickEvent -= OnReDo; comUI.nextClickEvent -= OnNextDo; //comUI = null; if (xiaohuaAnim != null) { xiaohuaAnim.timePointEvent = null; xiaohuaAnim.OnContinue(); xiaohuaAnim.ClearCompleteEvent(); } if (teacherAnim != null) { teacherAnim.timePointEvent = null; teacherAnim.OnContinue(); teacherAnim.ClearCompleteEvent(); } if (xhctrl != null) { xhctrl.DestroyGuadian(); } if (lsCtrl != null) { lsCtrl.DestroyGuadian(); } ChooseDo.Instance.ResetAll(); HighLightCtrl.GetInstance().OffAllObjs(); GlobalEntity.GetInstance().RemoveListener <ClickedObj>(ClickDispatcher.mEvent.DoClick, OnClickTeacherHandFirst); GlobalEntity.GetInstance().RemoveListener <ClickedObj>(ClickDispatcher.mEvent.DoClick, OnClickTeacherHandFinal); if (goodA != null) { Destroy(goodA); } if (emptyRoot != null) { Destroy(emptyRoot); emptyRoot = null; } evtFinished = null; evtRedo = null; Destroy(gameObject); }
void Finish() { ChooseDo.Instance.ResetAll(); UIManager.Instance.GetUI <CommonUI>("CommonUI").HideFinalUI(); HighLightCtrl.GetInstance().OffAllObjs(); if (XH != null) { XHCtrl xhctrl = XH.GetComponent <XHCtrl>(); xhctrl.DestroyGuadian(); } if (LS != null) { LSCtrl lsctrl = LS.GetComponent <LSCtrl>(); lsctrl.DestroyGuadian(); } RemoveAllListeners(); }
/// <summary> /// 将人物状态全部初始化 /// </summary> public void Reset() { for (int i = 0; i < transform.childCount; i++) { Transform temp = transform.GetChild(i); temp.localPosition = posArr[i]; //temp.gameObject.SetActive(false); //if (temp.name == "FDLS_BD") //{ // temp.Find("Group3/Main").localPosition = Vector3.zero; //} //else if (temp.name == "LS_BD") //{ // temp.Find("Group2/Main").localPosition = Vector3.zero; //} //else //{ // temp.Find("Group/Main").localPosition = Vector3.zero; //} temp.gameObject.SetActive(true); AnimationOper ao = temp.gameObject.GetAnimatorOper(); ao.OnContinue(); ao.ClearCompleteEvent(); ao.timePointEvent = null; temp.gameObject.GetAnimatorOper().PlayForward("idle"); XHCtrl xhctrl = temp.GetComponent <XHCtrl>(); if (xhctrl != null) { xhctrl.DestroyGuadian(); } LSCtrl lsctrl = temp.GetComponent <LSCtrl>(); if (lsctrl != null) { lsctrl.DestroyGuadian(); } } }
public void Dispose() { if (comUI == null) { comUI = UIManager.Instance.GetUI <CommonUI>("CommonUI"); } comUI.redoClickEvent -= OnReDo; comUI.nextClickEvent -= OnNextDo; comUI = null; if (xiaohuaAnim != null) { xiaohuaAnim.timePointEvent = null; XHCtrl xhctrl = xiaohuaAnim.GetComponent <XHCtrl>(); if (xhctrl != null) { xhctrl.DestroyGuadian(); } xiaohuaAnim.gameObject.SetActive(false); xiaohuaAnim.transform.Find("Group/Main").localPosition = new Vector3(1.952808f, 0, 0.3788859f); xiaohuaAnim.gameObject.SetActive(true); xiaohuaAnim.OnContinue(); xiaohuaAnim.ClearCompleteEvent(); DestroyImmediate(xiaohuaAnim.gameObject); PeopleManager.Instance.GetNewXH(); //xiaohuaAnim.PlayForward("idle"); } Transform zhuozi2 = EnhanceCommunityModel.GetInstance().Jiaoshi().transform.Find("shinei/zhuozi2"); zhuozi2.transform.localPosition = zhuozi2Pos; if (LS != null) { LS.timePointEvent = null; LS.OnContinue(); LSCtrl lsctrl = LS.GetComponent <LSCtrl>(); if (lsctrl != null) { lsctrl.DestroyGuadian(); } } evtFinished = null; evtRedo = null; if (emptyRoot != null) { Destroy(emptyRoot); emptyRoot = null; } GlobalEntity.GetInstance().RemoveListener <ClickedObj>(ClickDispatcher.mEvent.DoClick, OnClickTeacherHandFirst); GlobalEntity.GetInstance().RemoveListener <ClickedObj>(ClickDispatcher.mEvent.DoClick, OnClickteacherHandSecond); //恢复老师位置和相机位置 PeopleManager.Instance.GetPeople("LS_BD").transform.localPosition = lsOldPos; GlobalDataManager.GetInstance().SetPcesCamera(); Destroy(gameObject); }