Exemplo n.º 1
0
 internal Match(Gamer gamer, Bundle serverData)
     : base(serverData)
 {
     Gamer = gamer;
     CustomProperties = Bundle.Empty;
     Moves = new List<MatchMove>();
     GlobalState = Bundle.Empty;
     Players = new List<GamerInfo>();
     Shoe = Bundle.Empty;
     UpdateWithServerData(serverData);
 }
Exemplo n.º 2
0
 internal LoggedInEventArgs(Gamer gamer)
 {
     this.Gamer = gamer;
 }
Exemplo n.º 3
0
 public static void NotifyLoggedIn(object sender, Gamer gamer)
 {
     if (loggedIn != null) loggedIn(sender, new LoggedInEventArgs(gamer));
 }
Exemplo n.º 4
0
 internal GamerGodfather(Gamer parent)
 {
     Gamer = parent;
 }
Exemplo n.º 5
0
 internal GamerAchievements(Gamer parent)
 {
     Gamer = parent;
 }
Exemplo n.º 6
0
 internal GamerCommunity(Gamer parent)
 {
     Gamer = parent;
 }
Exemplo n.º 7
0
 internal GamerStore(Gamer parent)
 {
     Gamer = parent;
 }
Exemplo n.º 8
0
 internal MatchFinishEvent(Gamer gamer, Bundle serverData)
     : base(gamer, serverData)
 {
     Finished = serverData["event"]["finished"];
 }
Exemplo n.º 9
0
 internal MatchInviteEvent(Gamer gamer, Bundle serverData)
     : base(gamer, serverData)
 {
     Inviter = new GamerInfo(serverData["event"]["inviter"]);
 }
Exemplo n.º 10
0
 internal MatchMoveEvent(Gamer gamer, Bundle serverData)
     : base(gamer, serverData)
 {
     MoveData = serverData["event"]["move"];
     PlayerId = serverData["event"]["player_id"];
 }
Exemplo n.º 11
0
 internal MatchShoeDrawnEvent(Gamer gamer, Bundle serverData)
     : base(gamer, serverData)
 {
     Count = serverData["event"]["count"];
 }
Exemplo n.º 12
0
 internal MatchLeaveEvent(Gamer gamer, Bundle serverData)
     : base(gamer, serverData)
 {
     foreach (Bundle b in serverData["event"]["playersLeft"].AsArray()) {
         PlayersLeft.Add(new GamerInfo(b));
     }
 }
Exemplo n.º 13
0
 protected MatchEvent(Gamer gamer, Bundle serverData)
     : base(serverData)
 {
     MatchEventId = serverData["event"]["_id"];
     Match = new MatchInfo(gamer, serverData["event"]["match_id"]);
 }
Exemplo n.º 14
0
 internal GamerScores(Gamer parent)
 {
     Gamer = parent;
 }
Exemplo n.º 15
0
 internal GamerMatches(Gamer gamer)
 {
     Gamer = gamer;
 }
Exemplo n.º 16
0
 /// <summary>
 /// You need valid credentials in order to instantiate this class. Use Cloud.Login* methods for that purpose.
 /// Once the object is created, you need to start the thread, please look at the other methods available.
 /// </summary>
 /// <param name="gamer">The gamer object received from a login or similar function.</param>
 /// <param name="domain">The domain on which to listen for events. Note that you may create multiple event loops,
 ///     especially if you are using multiple domains. The default domain, that you should use unless you are
 ///     explicitly using multiple domains, is the private domain.</param>
 /// <param name="gamer">Gamer, used to authenticate (receive events related to the said gamer).</param>
 /// <param name="domain">Domain on which to listen for events.</param>
 /// <param name="iterationDuration">Sets a custom timeout in seconds for the long polling event loop. Should be used
 ///     with care and set to a high value (at least 60). Defaults to 590 (~10 min).</param>
 public DomainEventLoop(Gamer gamer, String domain = Common.PrivateDomain, int iterationDuration = 590)
 {
     Domain = domain;
     Gamer = gamer;
     LoopIterationDuration = iterationDuration * 1000;
 }