Exemplo n.º 1
0
        public void LogCrossPromotionEvent(CrossPromoEnum crossPromoType)
        {
            Dictionary <string, object> eventProperty = new Dictionary <string, object>()
            {
                { "Cross_promotion_type", crossPromoType.ToString() },
            };

            _yandexAppMetrica.ReportEvent(AnalyticsEnum.Cross_promotion_click.ToString(), eventProperty);
        }
Exemplo n.º 2
0
        private void OnCrossPromotionDataLoaded(DataSnapshot dataSnapshot)
        {
            Debug.LogError("Value: " + dataSnapshot);

            CrossPromoEnum appType = (CrossPromoEnum)Convert.ToInt32(dataSnapshot.GetRawJsonValue());

            if (appType == CrossPromoEnum.None)
            {
                return;
            }

            _gifAnimator.gameObject.SetActive(true);

            if (appType == CrossPromoEnum.All)
            {
                _currentAppIconImage.sprite = _crossPromotionDatas[0].AppIconSprite;
                _nextAppIconImage.sprite    = _crossPromotionDatas[1].AppIconSprite;

                _currentCrossPromotionData = _crossPromotionDatas[0];

                _nextCrossPromoDataIndex = 1;

                _isAllApps = true;

                return;
            }

            for (int i = 0; i < _crossPromotionDatas.Count; i++)
            {
                if (_crossPromotionDatas[i].AppType == appType)
                {
                    _currentCrossPromotionData  = _crossPromotionDatas[i];
                    _currentAppIconImage.sprite = _currentCrossPromotionData.AppIconSprite;
                    break;
                }
            }

            _gifAnimator.enabled = true;
        }