AppMetEvents.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Version for Unity
  3. * © 2015-2020 YANDEX
  4. * You may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. * https://yandex.com/legal/appmetrica_sdk_agreement/
  7. */
  8. using UnityEngine;
  9. using System.Collections.Generic;
  10. public class AppMetEvents : MonoBehaviour
  11. {
  12. //private AudioSource _audioSource;
  13. //private static AppMetEvents _instance;
  14. //public static AppMetEvents Instance { get { return _instance; } }
  15. //private Dictionary<string, object> eventParameters = new Dictionary<string, object>();
  16. //private void Awake()
  17. //{
  18. // if (_instance != null && _instance != this)
  19. // {
  20. // Destroy(gameObject);
  21. // }
  22. // else
  23. // {
  24. // _instance = this;
  25. // }
  26. // _audioSource = GetComponent<AudioSource>();
  27. // _audioSource.Play();
  28. // DontDestroyOnLoad(gameObject);
  29. //}
  30. //public void LevelStartEvent(int _level, int _gameCount, string type)
  31. //{
  32. // eventParameters["level_number"] = _level.ToString();
  33. // eventParameters["level_count"] = _gameCount.ToString();
  34. // eventParameters["level_random"] = "1";
  35. // eventParameters["level_type"] = type;
  36. // AppMetrica.Instance.ReportEvent("level_start", eventParameters);
  37. // eventParameters.Clear();
  38. //}
  39. //public void LevelFinishEvent(int _level, int _gameCount, string type, string _result, float _gametimer, int _progress)
  40. //{
  41. // eventParameters["level_number"] = _level.ToString();
  42. // eventParameters["level_count"] = _gameCount.ToString();
  43. // eventParameters["level_random"] = "1";
  44. // eventParameters["level_type"] = type;
  45. // eventParameters["result"] = _result;
  46. // eventParameters["time"] = _gametimer.ToString("f0");
  47. // eventParameters["progress"] = _progress.ToString("f0");
  48. // // eventParameters["continue"] = Spawn.ContinueCounter.ToString();
  49. // AppMetrica.Instance.ReportEvent("level_finish", eventParameters);
  50. // eventParameters.Clear();
  51. //}
  52. }