Beispiel #1
0
        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;
        }
Beispiel #2
0
        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;
 }
Beispiel #5
0
 public XboxTicker() : base(1.Minutes())
 {
     _old = XboxLive.FromGamerTag("dharun");
 }