Ejemplo n.º 1
0
 public MainLoop(IPclWorkarounds pclWorkarounds, IClientStatistics statistics, IClientSettings settings, IContext context, IRavcGameWindow gameWindow, IMainThreadBorderStage mainThreadBorderStage, IFinalFrameProvider finalFrameProvider, IClientStatisticsRenderer statisticsRenderer, ITextureLoader textureLoader)
 {
     this.settings = settings;
     this.context = context;
     this.statistics = statistics;
     this.gameWindow = gameWindow;
     this.mainThreadBorderStage = mainThreadBorderStage;
     this.finalFrameProvider = finalFrameProvider;
     this.statisticsRenderer = statisticsRenderer;
     finalRenderer = new FinalRenderer(pclWorkarounds, settings, context);
     cursorRenderer = new CursorRenderer(settings, context, textureLoader);
     stopwatch = new Stopwatch();
 }
Ejemplo n.º 2
0
        protected static ObservableDictionary <Specials, SpecialPercentages> BuildStatistics(IClientStatistics statistics)
        {
            int countSum     = statistics.SpecialCount.Values.Sum();
            int usedSum      = statistics.SpecialUsed.Values.Sum();
            int discardedSum = statistics.SpecialDiscarded.Values.Sum();
            ObservableDictionary <Specials, SpecialPercentages> returnValue = new ObservableDictionary <Specials, SpecialPercentages>();

            foreach (Specials special in Common.Helpers.EnumHelper.GetSpecials(b => b))
            {
                returnValue.Add(special, new SpecialPercentages
                {
                    Count     = BuildPercentage(statistics.SpecialCount, special, countSum),
                    Used      = BuildPercentage(statistics.SpecialUsed, special, usedSum),
                    Discarded = BuildPercentage(statistics.SpecialDiscarded, special, discardedSum),
                });
            }
            return(returnValue);
        }