Beispiel #1
0
        private float GetTimeOfDrawingOnePixel()
        {
            DynamicParametersManager dynamicParametersManager = DynamicParametersManager.Instance;
            DynamicParameter         sprayCapacity            = dynamicParametersManager.Get(DynamicParameterType.SprayBottleCapacity);

            //TODO вынести в константу
            float runningTime = 5 / dynamicParametersManager.Get(DynamicParameterType.RunningSpeed).Value;
            float drawingTime = (dynamicParametersManager.Get(DynamicParameterType.DrawingSpeed).Value *sprayCapacity.Value) / sprayCapacity.FirstValue;
            float sprayCoast  = sprayCapacity.Value / sprayCapacity.FirstValue;

            return((runningTime + drawingTime) / sprayCoast);
        }
Beispiel #2
0
        private void SendDrawnEvent()
        {
            IUserProfileModel        userProfileModel         = ServiceLocator.Instance.Get <IUserProfileModel>();
            DynamicParametersManager dynamicParametersManager = DynamicParametersManager.Instance;

            AnalyticEvent analyticEvent = new AnalyticEvent(StringConstants.AnalyticsEvents.DrawnGraffiti);

            analyticEvent.AddParameter(StringConstants.AnalyticsEventsParameters.BuildingId, userProfileModel.OpenedBuildingId);
            analyticEvent.AddParameter(StringConstants.AnalyticsEventsParameters.CountOfArtists, dynamicParametersManager.Get(DynamicParameterType.ArtistsCount).Value);
            analyticEvent.AddParameter(StringConstants.AnalyticsEventsParameters.MorePerBlock, dynamicParametersManager.Get(DynamicParameterType.RespectIncomePerBlock).Level);
            analyticEvent.AddParameter(StringConstants.AnalyticsEventsParameters.RunningSpeed, dynamicParametersManager.Get(DynamicParameterType.RunningSpeed).Level);
            analyticEvent.AddParameter(StringConstants.AnalyticsEventsParameters.DrawingSpeed, dynamicParametersManager.Get(DynamicParameterType.DrawingSpeed).Level);
            analyticEvent.AddParameter(StringConstants.AnalyticsEventsParameters.CapacityOfCans, dynamicParametersManager.Get(DynamicParameterType.SprayBottleCapacity).Level);
            analyticEvent.AddParameter(StringConstants.AnalyticsEventsParameters.CurrencyType, userProfileModel.OpenedBuildingCurrencyType.ToString().ToLower());
        }