protected override void Tick() { var xbox = XboxLive.FromGamerTag("dharun"); if (!xbox.Success) { return; } foreach (var source in xbox.Friends.Select(x => new { Old = _old.Friends.FirstOrDefault(o => o.GamerTag == x.GamerTag), New = x })) { if (source.Old.IsOnline != source.New.IsOnline) { var n = source.New.IsOnline; Brain.ListenerManager.CurrentListener.Output(n ? source.New.Description : source.New.GamerTag + " has signed off of Xbox Live"); continue; } if (source.New.IsOnline && source.Old.Presence != source.New.Presence) { Brain.ListenerManager.CurrentListener.Output(source.New.Description); ImageView.Create(source.New.LargeGamerTileUrl); } } _old = xbox; }
public IEnumerable <string> Handle(string input, Match match, IListener listener) { var x = XboxLive.FromGamerTag("dharun"); var r = x.Friends.Where(o => o.IsOnline).Select(o => o.Description); return(r); }
private void Awake() { this.EnsureEventSystem(); XboxLive.EnsureConfigured(); this.headerText.text = this.displayName; this.entryObjectPool = this.GetComponent <ObjectPool>(); this.UpdateButtons(); StatsManagerComponent.Instance.LocalUserAdded += LocalUserAdded; StatsManagerComponent.Instance.GetLeaderboardCompleted += GetLeaderboardCompleted; isLocalUserAdded = false; }
private void Awake() { XboxLive.EnsureConfigured(); this.manager = StatsManager.Singleton; }
public XboxTicker() : base(1.Minutes()) { _old = XboxLive.FromGamerTag("dharun"); }