public void ShowHideGameObject(GameObject gOBJ, ShowHideAction showHide) { switch (showHide) { case ShowHideAction.Show: gOBJ.Show(); break; case ShowHideAction.Hide: gOBJ.Hide(); break; } }
public void ShowHideGameObjectList(List <GameObject> list, ShowHideAction Action) { switch (Action) { case ShowHideAction.Show: for (int i = 0; i < list.Count; i++) { list[i].Show(); } break; case ShowHideAction.Hide: for (int i = 0; i < list.Count; i++) { list[i].Hide(); } break; } }
private IEnumerator StartAction(UiScreenElements[] uiScreenElements, ShowHideAction showHideAction) { for (int i = 0; i < uiScreenElements.Length; i++) { for (int j = 0; j < uiScreenElements[i].elements.Length; j++) { yield return(new WaitForSecondsRealtime(uiScreenElements[i].elements[j].waitBefore)); for (int k = 0; k < uiScreenElements[i].elements[j].elements.Length; k++) { if (uiScreenElements[i].elements[j].hasEffectWord) { LetDoTweenHandleShowHide(uiScreenElements[i].elements[j].elements[k], uiScreenElements[i].elements[j].effectWord); } else { switch (showHideAction) { case ShowHideAction.Show: uiScreenElements[i].elements[j].elements[k].Show(); break; case ShowHideAction.Hide: uiScreenElements[i].elements[j].elements[k].Hide(); break; } } yield return(new WaitForSecondsRealtime(uiScreenElements[i].elements[j].waitInBetween)); } yield return(new WaitForSecondsRealtime(uiScreenElements[i].elements[j].waitAfter)); } } NotificationParam param = new NotificationParam(Mode.intData); param.intData.Add((int)screenType); App.GetNotificationCenter().Notify(Notification.TransitionComplete, param); }
private void ShowHideElements(UiScreenElements[] uiScreenElements, ShowHideAction showHideAction) { StartCoroutine(StartAction(uiScreenElements, showHideAction)); }