Пример #1
0
    IEnumerator openCardEffect(UserPreviewCard card, DavinciController.ActionCallback callback)
    {
        yield return(new WaitForSeconds(1));

        card.openCard((bool isSuccess) => {
            callback();
        });
    }
Пример #2
0
 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);
 }
Пример #3
0
 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;
         }
     }
 }
Пример #4
0
    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;
            }
        }
    }