public void SetIm(string ImName, bool b) { if (ImName == "Sex") { Sex.OnOnlyObjs(b ? 1 : 0); } else if (ImName == "Head") { Head.SetActive(b); } else if (ImName == "Hand") { Hand.SetActive(b); } else if (ImName == "Foot") { Foot.SetActive(b); } else if (ImName == "Joint") { Joint.SetActive(b); } else if (ImName == "Body") { Body.SetActive(b); } }
void SetNob(ObjArray OA, char N_String) { switch (N_String) { case '0': OA.OnOnlyObjs(0); break; case '1': OA.OnOnlyObjs(1); break; case '2': OA.OnOnlyObjs(2); break; case '3': OA.OnOnlyObjs(3); break; case '4': OA.OnOnlyObjs(4); break; case '5': OA.OnOnlyObjs(5); break; case '6': OA.OnOnlyObjs(6); break; case '7': OA.OnOnlyObjs(7); break; case '8': OA.OnOnlyObjs(8); break; case '9': OA.OnOnlyObjs(9); break; default: OA.OnOffAll(false); break; } }
public void Open(int Nob) { string _Nob = Nob.ToString(); int [] NobInt = new int [_Nob.Length]; for (int i = 0; i < NobInt.Length; i++) { NobInt [i] = "0123456789".IndexOf(_Nob [i]); ObjArray OA = MyCalculate.SpObj(NobObj.gameObject, m_Nob.transform, Vector3.zero).GetComponent <ObjArray> (); OA.OnOnlyObjs(NobInt [i]); OA.gameObject.SetActive(true); } m_Nob.GetComponent <Tween_Color> ().Del += (f) => { Image [] Ims = GetComponentsInChildren <Image> (); foreach (Image i in Ims) { i.color = m_Nob.GetComponent <Tween_Color> ().NowColor; } }; m_Nob.GetComponent <Tween_Color> ().End_Del += () => { Destroy(gameObject); }; m_Nob.SetActive(true); m_Nob.GetComponent <Tween_Color> ().Play(true); }
public void Open() { if (MainCon.NowN >= 0 && MainCon.NowN < Names.AllObj.Length) { //改變刮漆下的字 if (MainCon.NowN < 3) { Texts.OnOnlyObjs(0); } else { Texts.OnOnlyObjs(1); } Names.OnOnlyObjs(MainCon.NowN); print(MainCon.NowN); } else { print("編號錯誤退回上一頁"); MainCon.Reset(-1); } }
public void Reset() { ObjArray LvObj = GetObjT <ObjArray> (Lv); ObjArray TuObj = LvObj.GetObjT <ObjArray> (Tu); OnOnlyObjs(Lv); LvObj.OnOnlyObjs(Tu); TuObj.OnOnlyObjs(Mod); UI.Images = GetComponentsInChildren <Image> (); if (Mod != 1) { UI.Tween_Color.Mod = 0; for (int i = 0; i < UI.Images.Length; i++) { UI.Images [i].color = Color.white; } } else { UI.Tween_Color.Play(true); } }