void initParas() { var goC = transform.Find("ndH/ndV/ndCard1").gameObject; goC.transform.SetParent(goMove.transform); var pos = goC.GetComponent <RectTransform>().anchoredPosition; _px = pos.x; _py = pos.y; Destroy(goC); var goL = transform.Find("goLeft/ndCard/ndCard3").gameObject; goL.transform.SetParent(goMove.transform); var posL = goL.GetComponent <RectTransform>().anchoredPosition; _ply = posL.y; _plx = posL.x; Destroy(goL); var goR = transform.Find("goRight/ndCard/ndCard2").gameObject; goR.transform.SetParent(goMove.transform); var posR = goR.GetComponent <RectTransform>().anchoredPosition; _prx = posR.x; Destroy(goR); undoMgr = new MoveMgrSpider(this); // redoMgr = new MoveMgrSpider (this); adMgr = AudioMgr.getInstance(); langMgr = LangMgr.getInstance(); tTrans = new Transform[] { transform.Find("ndH"), transform.Find("goRight"), transform.Find("goLeft") }; goChoice = transform.Find("goToggles"); reset(); }
public static LangMgr getInstance() { if (mgr == null) { mgr = new LangMgr(); } return(mgr); }
void initParas() { var goC = transform.Find("ndH/ndV/ndCard1").gameObject; goC.transform.SetParent(goMove.transform); var pos = goC.GetComponent <RectTransform>().anchoredPosition; _px = pos.x; _py = pos.y; Destroy(goC); var goL = transform.Find("goMedium/ndcard/ndCard2").gameObject; goL.transform.SetParent(goMove.transform); var posL = goL.GetComponent <RectTransform> ().anchoredPosition; _ply = posL.y; _plx = posL.x; Destroy(goL); var goR = transform.Find("goDes/ndcard/ndCard3").gameObject; goR.transform.SetParent(goMove.transform); var posR = goR.GetComponent <RectTransform> ().anchoredPosition; _prx = posR.x; Destroy(goR); _gameCount = 0; _bTouch = true; undoMgr = new MoveMgr(this); redoMgr = new MoveMgr(this); adMgr = AudioMgr.getInstance(); langMgr = LangMgr.getInstance(); tTrans = new Transform[] { transform.Find("ndH"), transform.Find("goMedium"), transform.Find("goDes") }; goChoice = transform.Find("goToggles"); goTips = transform.Find("tips").gameObject; reset(); }