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); }
internal LoggedInEventArgs(Gamer gamer) { this.Gamer = gamer; }
public static void NotifyLoggedIn(object sender, Gamer gamer) { if (loggedIn != null) loggedIn(sender, new LoggedInEventArgs(gamer)); }
internal GamerGodfather(Gamer parent) { Gamer = parent; }
internal GamerAchievements(Gamer parent) { Gamer = parent; }
internal GamerCommunity(Gamer parent) { Gamer = parent; }
internal GamerStore(Gamer parent) { Gamer = parent; }
internal MatchFinishEvent(Gamer gamer, Bundle serverData) : base(gamer, serverData) { Finished = serverData["event"]["finished"]; }
internal MatchInviteEvent(Gamer gamer, Bundle serverData) : base(gamer, serverData) { Inviter = new GamerInfo(serverData["event"]["inviter"]); }
internal MatchMoveEvent(Gamer gamer, Bundle serverData) : base(gamer, serverData) { MoveData = serverData["event"]["move"]; PlayerId = serverData["event"]["player_id"]; }
internal MatchShoeDrawnEvent(Gamer gamer, Bundle serverData) : base(gamer, serverData) { Count = serverData["event"]["count"]; }
internal MatchLeaveEvent(Gamer gamer, Bundle serverData) : base(gamer, serverData) { foreach (Bundle b in serverData["event"]["playersLeft"].AsArray()) { PlayersLeft.Add(new GamerInfo(b)); } }
protected MatchEvent(Gamer gamer, Bundle serverData) : base(serverData) { MatchEventId = serverData["event"]["_id"]; Match = new MatchInfo(gamer, serverData["event"]["match_id"]); }
internal GamerScores(Gamer parent) { Gamer = parent; }
internal GamerMatches(Gamer gamer) { Gamer = gamer; }
/// <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; }