Exemple #1
0
        /// <summary>
        /// Open the configurations for an existing gyro sensor or add a new gyro sensor
        /// </summary>
        /// <param name="i"></param>
        public void OnGyroDropdownClicked(int i)
        {
            if (i == 0)
            {
                return;
            }
            if (i - 1 == numGyros) //Add button
            {
                List <GameObject> updatedList = sensorManagerGUI.AddGyro();
                UpdateSensorDropdown(gyroDropdown, updatedList);
                numGyros++;

                if (PlayerPrefs.GetInt("analytics") == 1)
                {
                    Analytics.CustomEvent("Added Gyro", new Dictionary <string, object> //for analytics tracking
                    {
                    });
                }
            }
            else //Edit one of the existing sensors
            {
                sensorManagerGUI.SetGyroAsCurrent(i - 1);
                sensorManagerGUI.StartConfiguration();
            }
            gyroDropdown.value = 0;
        }
Exemple #2
0
        /// <summary>
        /// Open the configurations for an existing gyro sensor or add a new gyro sensor
        /// </summary>
        /// <param name="i"></param>
        public void OnGyroDropdownValueChanged(int i)
        {
            if (i == 0)
            {
                return;
            }
            if (i - 1 == numGyros) //Add button
            {
                List <GameObject> updatedList = sensorManagerGUI.AddGyro();
                UpdateSensorDropdown(gyroDropdown, updatedList);
                numGyros++;

                AnalyticsManager.GlobalInstance.LogEventAsync(AnalyticsLedger.EventCatagory.SensorTab,
                                                              AnalyticsLedger.EventAction.Added,
                                                              "Gyroscope",
                                                              AnalyticsLedger.getMilliseconds().ToString());
            }
            else //Edit one of the existing sensors
            {
                sensorManagerGUI.SetGyroAsCurrent(i - 1);
                sensorManagerGUI.StartConfiguration();

                AnalyticsManager.GlobalInstance.LogEventAsync(AnalyticsLedger.EventCatagory.SensorTab,
                                                              AnalyticsLedger.EventAction.Edited,
                                                              "Gyroscope",
                                                              AnalyticsLedger.getMilliseconds().ToString());
            }
            gyroDropdown.value = 0;

            AnalyticsManager.GlobalInstance.LogEventAsync(AnalyticsLedger.EventCatagory.SensorTab,
                                                          AnalyticsLedger.EventAction.Clicked,
                                                          "Dropdown - Gyroscope",
                                                          AnalyticsLedger.getMilliseconds().ToString());
        }