IEnumerator openCardEffect(UserPreviewCard card, DavinciController.ActionCallback callback) { yield return(new WaitForSeconds(1)); card.openCard((bool isSuccess) => { callback(); }); }
public void show(DavinciController.ActionCallback callback) { //labelTurn.text = nickName + "[99ff00] TURN [-]"; isNext = true; if (effect == null) { effect = labelTurn.gameObject.GetComponent <TypewriterEffect>(); } effect.ResetToBeginning(); this.callback = callback; this.gameObject.SetActive(true); }
public void openCard(int index, DavinciController.ActionCallback callback) { foreach (GameObject obj in preViewList) { UserPreviewCard card = obj.GetComponent <UserPreviewCard>(); if (card != null && card.getIndex() == index) { StartCoroutine(openCardEffect(card, callback)); break; } } }
public void openCard(int turnIndex, int cardIndex, DavinciController.ActionCallback callback) { UserGameData user = userList[turnIndex]; foreach (GameObject obj in playUserList) { UserPanel userPanel = obj.GetComponent <UserPanel>(); if (userPanel.userData.email.Equals(user.email)) { userPanel.openCard(cardIndex, callback); break; } } }