Пример #1
0
        public virtual void GetScreenTransition(int index, int screenId, int toScreenId, UserFilter filter, System.Action <ScreenResult> onResult)
        {
            var result = new ScreenResult();

            result.count       = Random.Range(100, 200);
            result.uniqueCount = Random.Range(0, 100);
            onResult(result);
        }
		public virtual void GetScreen(int screenId, UserFilter filter, System.Action<ScreenResult> onResult) {
			
			var result = new ScreenResult();
			result.count = Random.Range(100, 200);
			result.uniqueCount = Random.Range(0, 100);
			onResult(result);
			
		}
Пример #3
0
		public override void OnFlowWindow(FD.FlowWindow window) {

			if (window.isVisibleState == false) return;
			if (window.IsContainer() == true) return;
			if (window.IsSmall() == true && window.IsFunction() == true) return;
			if (window.IsShowDefault() == true) return;

			if (Heatmap.settings == null) Heatmap.settings = Heatmap.GetSettingsFile();
			
			var settings = Heatmap.settings;
			if (settings != null) {

				var result = new ScreenResult();

				foreach (var item in settings.items) {
					
					if (item.show == true && item.enabled == true) {
						
						foreach (var serviceBase in this.editor.services) {

							var service = serviceBase as IAnalyticsService;
							if (service.GetServiceName() == item.serviceName) {

								var rect = window.rect;
								this.DrawBubble(new Rect(new Vector2(rect.x + rect.width * 0.5f, rect.y), Vector2.zero), 0, window.id, -1, Vector2.zero, "LabelGreen");

								int value;
								var keyTransition = string.Format("{0}_{1}", item.serviceName, window.id);
								if (this.resultsTransitionCache.TryGetValue(keyTransition, out value) == true) {

									result.uniqueCount = value;

								}

								if (result.uniqueCount > 0 && result.popup == false) {

									// Draw exit bubble
									this.DrawBubble(new Vector2(rect.x + rect.width * 0.5f, rect.y + rect.height), result, Vector2.zero, "LabelRed", "{1}");

								}

							}

						}

					}

				}

			}

		}
Пример #4
0
		public void DrawBubble(Vector2 position, ScreenResult result, Vector2 centerOffset, string styleName = "LabelYellow", string format = "<b>All:</b> {0}\n<b>Unique:</b> {1}") {

			var content = string.Format(format, result.count, result.uniqueCount);

			this.DrawBubble(position, content, styleName, centerOffset);

		}