Exemplo n.º 1
0
 private IPromise <MulliganResponse> ReceiveMulliganHand()
 {
     return(RecvString().Then(str => {
         Promise <MulliganResponse> pc = new Promise <MulliganResponse>();
         MulliganResponse response = JsonConvert
                                     .DeserializeObject <MulliganResponse>(str);
         pc.Resolve(response);
         return pc;
     }));
 }
Exemplo n.º 2
0
    private IEnumerator <System.Object> StartMulliganScene(MulliganResponse hand)
    {
        SceneManager.LoadScene("Mulligan");
        // After a LoadScene, we must wait one frame before calling FindObjectsOfType
        yield return(null);

        mulliganRow        = (MulliganRow)FindObjectOfType(typeof(MulliganRow));
        whoGoesFirstScreen = (WhoGoesFirstScreen)FindObjectOfType(typeof(WhoGoesFirstScreen));
        mulliganCountText  = (MulliganCountText)FindObjectOfType(typeof(MulliganCountText));
        mulliganRow.Populate(hand.cards.Select(c => c.ToMulliganCard(mulliganRow)));
    }