/// <summary>
        /// Start is a function called when the result scene is loaded.
        /// It will fill in all declared storage objects with the collected gameplay data
        /// and then send all data to the remote Elasticsearch dataset.
        /// </summary>
        private IEnumerator Start()
        {
            // Wait for 1 frame to upload the result
            yield return(null);

            // Loading times count increases
            BatterySesstionLoadingTimesControl.resultSceneLoadingTimesCnt += 1;

            // Only execute methods when result page is first time loaded
            if (BatterySesstionLoadingTimesControl.resultSceneLoadingTimesCnt < 2)
            {
                //initialize storage
                storage = gameObject.AddComponent <ElasticsearchStorageManager>();

                //fill in state variables
                FillPlayer();
                FillSessionId();
                FillGameOrder();
                FillAllGameData();


                //call Measure() to execute all measurement modules
                AbilityManagement.Measure();

                //After Measure() being called, subScoreSeq and overallScoreSeq should be
                //completly filled in AbilityManagement.cs
                //Thus, set the bool variable to true
                measureEnd = true;

                //fill in result sequences
                FillSubScoreSeq();
                FillOverallScoreSeq();


                //fill in batterySessionStorage
                FillBatterySessionStorage();


                //send data to the Elasticsearch dataset
                storage.Store(batterySessionStorage);
            }
        }
 /// <summary>
 /// FillOverallScoreSeq is to add overall score records to the overallScoreSeq list.
 /// </summary>
 public void FillOverallScoreSeq()
 {
     overallScoreSeq = AbilityManagement.GetOverallScoreSeq();
 }
 /// <summary>
 /// FillSubScoreSeq is to add subscore records to the subScoreSeq list.
 /// </summary>
 public void FillSubScoreSeq()
 {
     subScoreSeq = AbilityManagement.GetSubScoreSeq();
 }