コード例 #1
0
        public void OnTimedEvent(MindVision mindVision, Action <object> callback)
        {
            try
            {
                IMemoryUpdate result = new MemoryUpdate();
                AchievementToastNotifier.HandleDisplayingAchievementToast(mindVision, result);
                //OpenedPackNotifier.HandleOpenedPack(mindVision, result);
                //CollectionNotifier.HandleNewCards(mindVision, result);
                CurrentSceneNotifier.HandleSceneMode(mindVision, result);
                XpChangeNotifier.HandleXpChange(mindVision, result);
                SelectedDeckNotifier.HandleSelectedDeck(mindVision, result);

                if (result.HasUpdates)
                {
                    callback(result);
                }
            }
            catch (Exception e)
            {
                // Do nothing? So that the timer isn't broken if the initialization didn't work properly?
                callback(e.Message);
                callback(e.StackTrace);
                callback("reset");
            }
        }
コード例 #2
0
        public IMemoryUpdate GetMemoryChanges(MindVision mindVision)
        {
            IMemoryUpdate result = new MemoryUpdate();

            OpenedPackNotifier.HandleOpenedPack(mindVision, result);
            CollectionNotifier.HandleNewCards(mindVision, result);
            if (result.HasUpdates)
            {
                return(result);
            }

            return(null);
        }