Esempio n. 1
0
 public static void NewEvent(
     GAProgressionStatus progressionStatus,
     string progression01,
     IDictionary <string, object> fields)
 {
     GA_Progression.CreateEvent(progressionStatus, progression01, (string)null, (string)null, new int?(), fields);
 }
        // ----------------- Public Methods ----------------------
        public void LogProgress(ProgressStatus progressStatus, string progress1 = "", string progress2 = "", string progress3 = "", int?value = null)
        {
            GAProgressionStatus gaProgressStatus = GAProgressionStatus.Start;

            if (progressStatus == ProgressStatus.Complete)
            {
                gaProgressStatus = GAProgressionStatus.Complete;
            }
            else if (progressStatus == ProgressStatus.Fail)
            {
                gaProgressStatus = GAProgressionStatus.Fail;
            }
            else if (progressStatus == ProgressStatus.Start)
            {
                gaProgressStatus = GAProgressionStatus.Start;
            }

            // Log progress
            if (value != null)
            {
                GameAnalytics.NewProgressionEvent(gaProgressStatus, progress1, progress2, progress3, (int)value);
            }
            else
            {
                GameAnalytics.NewProgressionEvent(gaProgressStatus, progress1, progress2, progress3);
            }

            debugger.Log(string.Format("Logged Progress Analytic: status: {0}, seg1: {1}, seg2: {2}, seg3: {3}, value: {4}", gaProgressStatus, progress1, progress2, progress3, value));
        }
Esempio n. 3
0
 public static bool ValidateProgressionEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03)
 {
     if (progressionStatus == GAProgressionStatus.Undefined)
     {
         UnityEngine.Debug.Log("Validation fail - progression event: Invalid progression status.");
         return(false);
     }
     if (!string.IsNullOrEmpty(progression03) && string.IsNullOrEmpty(progression02) && !string.IsNullOrEmpty(progression01))
     {
         UnityEngine.Debug.Log("Validation fail - progression event: 03 found but 01+02 are invalid. Progression must be set as either 01, 01+02 or 01+02+03.");
         return(false);
     }
     if (!string.IsNullOrEmpty(progression02) && string.IsNullOrEmpty(progression01))
     {
         UnityEngine.Debug.Log("Validation fail - progression event: 02 found but not 01. Progression must be set as either 01, 01+02 or 01+02+03");
         return(false);
     }
     if (string.IsNullOrEmpty(progression01))
     {
         UnityEngine.Debug.Log("Validation fail - progression event: progression01 not valid. Progressions must be set as either 01, 01+02 or 01+02+03");
         return(false);
     }
     if (!ValidateEventPartLength(progression01, allowNull: false))
     {
         UnityEngine.Debug.Log("Validation fail - progression event - progression01: Cannot be (null), empty or above 64 characters. String: " + progression01);
         return(false);
     }
     if (!ValidateEventPartCharacters(progression01))
     {
         UnityEngine.Debug.Log("Validation fail - progression event - progression01: Cannot contain other characters than A-z, 0-9, -_., ()!?. String: " + progression01);
         return(false);
     }
     if (!string.IsNullOrEmpty(progression02))
     {
         if (!ValidateEventPartLength(progression02, allowNull: true))
         {
             UnityEngine.Debug.Log("Validation fail - progression event - progression02: Cannot be empty or above 64 characters. String: " + progression02);
             return(false);
         }
         if (!ValidateEventPartCharacters(progression02))
         {
             UnityEngine.Debug.Log("Validation fail - progression event - progression02: Cannot contain other characters than A-z, 0-9, -_., ()!?. String: " + progression02);
             return(false);
         }
     }
     if (!string.IsNullOrEmpty(progression03))
     {
         if (!ValidateEventPartLength(progression03, allowNull: true))
         {
             UnityEngine.Debug.Log("Validation fail - progression event - progression03: Cannot be empty or above 64 characters. String: " + progression03);
             return(false);
         }
         if (!ValidateEventPartCharacters(progression03))
         {
             UnityEngine.Debug.Log("Validation fail - progression event - progression03: Cannot contain other characters than A-z, 0-9, -_., ()!?. String: " + progression03);
             return(false);
         }
     }
     return(true);
 }
Esempio n. 4
0
        private void Submit(InputField input)
        {
            GAProgressionStatus name = GAProgressionStatus.Start;

            GameAnalytics.NewProgressionEvent(name, "Added Name: ", input.text);
            Debug.Log("Submitted");
        }
Esempio n. 5
0
 /// <summary>
 /// Measure player progression in the game. It follows a 3 hierarchy structure (world, level and phase) to indicate a player's path or place.
 /// </summary>
 /// <param name="progressionStatus">Status of added progression.</param>
 /// <param name="progression01">1st progression (e.g. world01).</param>
 /// <param name="progression02">2nd progression (e.g. level01).</param>
 /// <param name="progression03">3rd progression (e.g. phase01).</param>
 /// <param name="score">The player's score.</param>
 public static void NewProgressionEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03, int score)
 {
     if (!GameAnalytics._hasInitializeBeenCalled)
     {
         Debug.LogWarning("GameAnalytics: REMEMBER THE SDK NEEDS TO BE MANUALLY INITIALIZED NOW");
     }
     GA_Progression.NewEvent(progressionStatus, progression01, progression02, progression03, score);
 }
 public static void NewProgressionEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03, int score)
 {
     if (!GameAnalyticsSDK.GameAnalytics._hasInitializeBeenCalled)
     {
         return;
     }
     GA_Progression.NewEvent(progressionStatus, progression01, progression02, progression03, score, null);
 }
Esempio n. 7
0
 /// <summary>
 /// Measure player progression in the game. It follows a 3 hierarchy structure (world, level and phase) to indicate a player's path or place.
 /// </summary>
 /// <param name="progressionStatus">Status of added progression.</param>
 /// <param name="progression01">1st progression (e.g. world01).</param>
 /// <param name="progression02">2nd progression (e.g. level01).</param>
 public static void NewProgressionEvent(GAProgressionStatus progressionStatus, string progression01, string progression02)
 {
     if (!GameAnalytics._hasInitializeBeenCalled)
     {
         Debug.LogError("GameAnalytics: REMEMBER THE SDK NEEDS TO BE MANUALLY INITIALIZED NOW");
         return;
     }
     GA_Progression.NewEvent(progressionStatus, progression01, progression02, null);
 }
Esempio n. 8
0
 private static void CreateEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03, int?score, IDictionary <string, object> fields)
 {
     if (!score.HasValue)
     {
         GA_Wrapper.AddProgressionEvent(progressionStatus, progression01, progression02, progression03, fields);
         return;
     }
     GA_Wrapper.AddProgressionEventWithScore(progressionStatus, progression01, progression02, progression03, score.Value, fields);
 }
Esempio n. 9
0
 public static void NewProgressionEvent(
     GAProgressionStatus progressionStatus,
     string progression01)
 {
     if (!GameAnalytics._hasInitializeBeenCalled)
     {
         return;
     }
     GA_Progression.NewEvent(progressionStatus, progression01, (IDictionary <string, object>)null);
 }
Esempio n. 10
0
 public static void NewEvent(
     GAProgressionStatus progressionStatus,
     string progression01,
     string progression02,
     string progression03,
     int score,
     IDictionary <string, object> fields)
 {
     GA_Progression.CreateEvent(progressionStatus, progression01, progression02, progression03, new int?(score), fields);
 }
Esempio n. 11
0
        public static void AddProgressionEvent(
            GAProgressionStatus progressionStatus,
            string progression01,
            string progression02,
            string progression03,
            IDictionary <string, object> fields)
        {
            string jsonString = GA_Wrapper.DictionaryToJsonString(fields);

            GA_Wrapper.addProgressionEvent((int)progressionStatus, progression01, progression02, progression03, jsonString);
        }
 private static void CreateEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03, int? score)
 {
     if(score.HasValue)
     {
         GA_Wrapper.AddProgressionEventWithScore(progressionStatus, progression01, progression02, progression03, score.Value);
     }
     else
     {
         GA_Wrapper.AddProgressionEvent(progressionStatus, progression01, progression02, progression03);
     }
 }
Esempio n. 13
0
 // Token: 0x06000149 RID: 329 RVA: 0x0000ABCB File Offset: 0x00008FCB
 private static void CreateEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03, int?score)
 {
     if (score != null)
     {
         GA_Wrapper.AddProgressionEventWithScore(progressionStatus, progression01, progression02, progression03, score.Value);
     }
     else
     {
         GA_Wrapper.AddProgressionEvent(progressionStatus, progression01, progression02, progression03);
     }
 }
Esempio n. 14
0
 public static void NewProgressionEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03, int score)
 {
     if (!_hasInitializeBeenCalled)
     {
         UnityEngine.Debug.LogError("GameAnalytics: REMEMBER THE SDK NEEDS TO BE MANUALLY INITIALIZED NOW");
     }
     else
     {
         GA_Progression.NewEvent(progressionStatus, progression01, progression02, progression03, score, null);
     }
 }
Esempio n. 15
0
        public static void AddProgressionEventWithScore(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03, int score)
        {
#if UNITY_EDITOR
            if (GameAnalyticsSDK.Validators.GAValidator.ValidateProgressionEvent(progressionStatus, progression01, progression02, progression03))
            {
                addProgressionEventWithScore((int)progressionStatus, progression01, progression02, progression03, score);
            }
#else
            addProgressionEventWithScore((int)progressionStatus, progression01, progression02, progression03, score);
#endif
        }
Esempio n. 16
0
        public static void AddProgressionEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03, IDictionary <string, object> fields, bool mergeFields)
        {
            string fieldsAsString = DictionaryToJsonString(fields);

#if UNITY_EDITOR
            if (GAValidator.ValidateProgressionEvent(progressionStatus, progression01, progression02, progression03))
            {
                addProgressionEvent((int)progressionStatus, progression01, progression02, progression03, fieldsAsString, mergeFields);
            }
#else
            addProgressionEvent((int)progressionStatus, progression01, progression02, progression03, fieldsAsString, mergeFields);
#endif
        }
Esempio n. 17
0
        public static void AddProgressionEventWithScore(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03, int score, IDictionary <string, object> fields)
        {
            string fieldsAsString = DictionaryToJsonString(fields);

#if UNITY_EDITOR
            if (GameAnalyticsSDK.Validators.GAValidator.ValidateProgressionEvent(progressionStatus, progression01, progression02, progression03))
            {
                addProgressionEventWithScore((int)progressionStatus, progression01, progression02, progression03, score, fieldsAsString);
            }
#else
            addProgressionEventWithScore((int)progressionStatus, progression01, progression02, progression03, score, fieldsAsString);
#endif
        }
Esempio n. 18
0
/* status = start or complete fail etc , world = Indoor or outdoor ,level = questposition , phase = quest#  */
    public void LogProgressionEvent(GAProgressionStatus status, string world, string point, string phase, int prize)
    {
                        #if UNITY_IPHONE
        GameAnalytics.NewProgressionEvent(status, world, point, phase, prize);
                        #endif
                        #if UNITY_ANDROID
        if (UserPrefs.isAmazonBuild)
        {
        }
        else
        {
            GameAnalytics.NewProgressionEvent(status, world, point, phase, prize);
        }
                        #endif
    }
Esempio n. 19
0
 public override void Reset()
 {
     ProgressionStatus = GAProgressionStatus.Start;
     Progression01     = new FsmString()
     {
         UseVariable = false
     };
     Progression02 = new FsmString()
     {
         UseVariable = false
     };
     Progression03 = new FsmString()
     {
         UseVariable = false
     };
     Score = new FsmInt()
     {
         UseVariable = false
     };
 }
        internal static void TrackProgressEvent(GAProgressionStatus status, string progress, int?score)
        {
            if (_isDisabled)
            {
                return;
            }

            var progressEvent = new ProgressEvent {
                status   = status,
                progress = progress,
                score    = score
            };

            if (!_isInitialized)
            {
                VoodooLog.Log(TAG, "GameAnalytics NOT initialized queuing event..." + status);
                QueuedEvents.Enqueue(progressEvent);
            }
            else
            {
                VoodooLog.Log(TAG, "Sending event " + status + " to GameAnalytics");
                progressEvent.Track();
            }
        }
 public static void NewEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03, int score)
 {
     CreateEvent(progressionStatus, progression01, progression02, progression03, score);
 }
 public static void NewEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, int score)
 {
     CreateEvent(progressionStatus, progression01, progression02, null, score);
 }
Esempio n. 23
0
 public static void NewEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03, int score, IDictionary <string, object> fields, bool mergeFields)
 {
     CreateEvent(progressionStatus, progression01, progression02, progression03, score, fields, mergeFields);
 }
 public static void NewEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03)
 {
     CreateEvent(progressionStatus, progression01, progression02, progression03, null);
 }
Esempio n. 25
0
 /// <summary>
 /// Measure player progression in the game. It follows a 3 hierarchy structure (world, level and phase) to indicate a player's path or place.
 /// </summary>
 /// <param name="progressionStatus">Status of added progression.</param>
 /// <param name="progression01">1st progression (e.g. world01).</param>
 /// <param name="progression02">2nd progression (e.g. level01).</param>
 public static void NewProgressionEvent(GAProgressionStatus progressionStatus, string progression01, string progression02)
 {
     GA_Progression.NewEvent(progressionStatus, progression01, progression02);
 }
Esempio n. 26
0
 /// <summary>
 /// Measure player progression in the game. It follows a 3 hierarchy structure (world, level and phase) to indicate a player's path or place.
 /// </summary>
 /// <param name="progressionStatus">Status of added progression.</param>
 /// <param name="progression01">1st progression (e.g. world01).</param>
 /// <param name="progression02">2nd progression (e.g. level01).</param>
 /// <param name="progression03">3rd progression (e.g. phase01).</param>
 /// <param name="score">The player's score.</param>
 public static void NewProgressionEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03, int score)
 {
     GA_Progression.NewEvent(progressionStatus, progression01, progression02, progression03, score);
 }
Esempio n. 27
0
 public static void AddProgressionEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03)
 {
     addProgressionEvent((int)progressionStatus, progression01, progression02, progression03);
 }
Esempio n. 28
0
 public static void NewEvent(GAProgressionStatus progressionStatus, string progression01, IDictionary <string, object> fields, bool mergeFields)
 {
     CreateEvent(progressionStatus, progression01, null, null, null, fields, mergeFields);
 }
Esempio n. 29
0
 public static void NewEvent(GAProgressionStatus progressionStatus, string progression01, int score, IDictionary <string, object> fields)
 {
     CreateEvent(progressionStatus, progression01, null, null, score, fields);
 }
Esempio n. 30
0
 public static void AddProgressionEventWithScore(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03, int score)
 {
     addProgressionEventWithScore((int)progressionStatus, progression01, progression02, progression03, score);
 }
 public static void NewEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03)
 {
     CreateEvent(progressionStatus, progression01, progression02, progression03, null);
 }
Esempio n. 32
0
 // Token: 0x06000143 RID: 323 RVA: 0x0000AB38 File Offset: 0x00008F38
 public static void NewEvent(GAProgressionStatus progressionStatus, string progression01)
 {
     GA_Progression.CreateEvent(progressionStatus, progression01, null, null, null);
 }
Esempio n. 33
0
 // Token: 0x06000148 RID: 328 RVA: 0x0000ABB9 File Offset: 0x00008FB9
 public static void NewEvent(GAProgressionStatus progressionStatus, string progression01, string progression02, string progression03, int score)
 {
     GA_Progression.CreateEvent(progressionStatus, progression01, progression02, progression03, new int?(score));
 }