Ejemplo n.º 1
0
 private static void SaveLastFlags()
 {
     MembershipManager._lastHistoryFlag = MembershipManager.GetAccess(STSWMMSFeatureFlagType.Profile_History);
     MembershipManager._lastStatsFlag   = MembershipManager.GetAccess(STSWMMSFeatureFlagType.Profile_Stats);
     PlayerPrefs.SetInt("HistoryFlagKey", (!MembershipManager._lastHistoryFlag ? 0 : 1));
     PlayerPrefs.SetInt("StatsFlagKey", (!MembershipManager._lastStatsFlag ? 0 : 1));
 }
Ejemplo n.º 2
0
 private bool CheckAccess()
 {
     if (!this.IsMMSReady)
     {
         return(false);
     }
     return(MembershipManager.GetAccess(this._membershipFlag));
 }
Ejemplo n.º 3
0
 private void SetMembershipSideSpin()
 {
     if (!MembershipManager.GetAccess(STSWMMSFeatureFlagType.Settings_SideSpinSideAxis))
     {
         this._shotSpinSlider.interactable = false;
         this._shotSpinSlider.GetComponent <EventTrigger>().enabled = false;
         this._ballSpinGroup.alpha = 0.7f;
     }
 }
Ejemplo n.º 4
0
 private void SetMembershipHandness()
 {
     if (!MembershipManager.GetAccess(STSWMMSFeatureFlagType.Settings_GolferOrientation))
     {
         this._handnessSlider.interactable = false;
         this._handnessSlider.GetComponent <EventTrigger>().enabled = false;
         this._dominantHandGroup.alpha = 0.7f;
     }
 }
Ejemplo n.º 5
0
 private void SetMembershipAltitude()
 {
     if (!MembershipManager.GetAccess(STSWMMSFeatureFlagType.Settings_Environmental_Altitude))
     {
         this._altitudeInput.text         = "500";
         this._altitudeInput.interactable = false;
         this._altitudeGroup.alpha        = 0.7f;
         this.SetAltitudeInternal(false);
     }
 }
Ejemplo n.º 6
0
 private void SetMembershipTemperature()
 {
     if (!MembershipManager.GetAccess(STSWMMSFeatureFlagType.Settings_Temperature))
     {
         this._temperatureInput.text         = "70";
         this._temperatureInput.interactable = false;
         this._temperatureGroup.alpha        = 0.7f;
         this.SetTempInternal(false);
     }
 }
Ejemplo n.º 7
0
 private void SetMembershipHumidity()
 {
     if (!MembershipManager.GetAccess(STSWMMSFeatureFlagType.Settings_Environmental_Humidity))
     {
         this._humidityDropdown.@value       = 4;
         this._humidityDropdown.interactable = false;
         this._humidityGroup.alpha           = 0.7f;
         this.SetHumidityInternal(false);
     }
 }
Ejemplo n.º 8
0
 private void RemoveItemFromPopup(List <Dropdown.OptionData> dropdownOptions, STSWMMSFeatureFlagType flag, string cmpString)
 {
     if (!MembershipManager.GetAccess(flag))
     {
         int num = dropdownOptions.FindIndex(0, (Dropdown.OptionData s) => s.text.Equals(cmpString));
         if (dropdownOptions.Count > num && num >= 0)
         {
             dropdownOptions.RemoveAt(num);
         }
     }
 }
Ejemplo n.º 9
0
    private void SetCameraInternal(bool saveSetting)
    {
        if (saveSetting || this._saveSettingsGlobal)
        {
            this.SaveSettingToJson((!this.isSAorBMMode ? GameSettings.GameSetting.CameraValue : GameSettings.GameSetting.SACameraValue), this._cameraAngleDropdown.options[this._cameraAngleDropdown.@value].text);
            this.SaveSessionSettingsToPlayerPrefsIfEnabled(false);
        }
        this._golfCamera.RemoveOverride();
        switch (this._cameraAngleDropdown.@value)
        {
        case 0:
        {
            this._golfCamera.SetCameraBehavior(CGolfCamera.CAMERA_BEHAVIOR.CAMERA_STATIC_USER_PERSPECTIVE);
            this._gameManager.SetupPlayCamera(CGolfCamera.CAMERA_BEHAVIOR.CAMERA_STATIC_USER_PERSPECTIVE, true);
            break;
        }

        case 1:
        {
            this._golfCamera.SetCameraBehavior(CGolfCamera.CAMERA_BEHAVIOR.CAMERA_STATIC_USER_PERSPECTIVE);
            this._gameManager.SetupPlayCamera(CGolfCamera.CAMERA_BEHAVIOR.CAMERA_LAND_DYNAMIC, true);
            break;
        }

        case 2:
        {
            this._golfCamera.SetCameraBehavior(CGolfCamera.CAMERA_BEHAVIOR.CAMERA_STATIC_USER_PERSPECTIVE);
            this._gameManager.SetupPlayCamera(CGolfCamera.CAMERA_BEHAVIOR.CAMERA_STATIC_DOWNRANGE, false);
            break;
        }

        case 3:
        {
            this._golfCamera.SetCameraBehavior(CGolfCamera.CAMERA_BEHAVIOR.CAMERA_STATIC_USER_PERSPECTIVE);
            this._gameManager.SetupPlayCamera(CGolfCamera.CAMERA_BEHAVIOR.CAMERA_FOLLOW_BEHIND_BALL, false);
            break;
        }

        case 4:
        {
            this._golfCamera.UserOverride(CGolfCamera.CAMERA_BEHAVIOR.CAMERA_45_DEGREES);
            this._gameManager.SetupPlayCamera(CGolfCamera.CAMERA_BEHAVIOR.CAMERA_45_DEGREES, false);
            break;
        }

        default:
        {
            this._golfCamera.RemoveOverride();
            break;
        }
        }
        this._cameraAngleDropdown.ChangeAvailabilityAdjustOffsetButton((!MembershipManager.GetAccess(STSWMMSFeatureFlagType.Settings_CameraAngleOffset) || this._golfCamera.GetCurrentBehavior() == CGolfCamera.CAMERA_BEHAVIOR.CAMERA_45_DEGREES ? false : this._golfCamera.GetCurrentBehavior() != CGolfCamera.CAMERA_BEHAVIOR.CAMERA_45_DEGREES_ZOOM));
    }
Ejemplo n.º 10
0
 private void SetMembershipDispersionCircles()
 {
     if (!MembershipManager.GetAccess(STSWMMSFeatureFlagType.Settings_DispersionCircles))
     {
         this._dispersionCirclesSlider.@value       = 0f;
         this._dispersionCirclesSlider.interactable = false;
         this._dispersionCirclesSlider.GetComponent <EventTrigger>().enabled = false;
         this._dispersionCirclesGroup.alpha      = 0.7f;
         this._shotDispersionSlider.interactable = false;
         this._shotDispersionSlider.GetComponent <EventTrigger>().enabled = false;
         this._dispersionDistanceGroup.alpha = 0.7f;
     }
 }
Ejemplo n.º 11
0
 private void SetMembershipCameraOffset()
 {
     if (MembershipManager.GetAccess(STSWMMSFeatureFlagType.Settings_CameraAngleOffset))
     {
         this._cameraAngleDropdown.ChangeAvailabilityAdjustOffsetButton(true);
     }
     else
     {
         this.SetCameraOffset(0.5f);
         this.ApplyCameraOffsetInternal(0.5f, false);
         this._cameraAngleDropdown.ChangeAvailabilityAdjustOffsetButton(false);
     }
 }
Ejemplo n.º 12
0
 private void SetMembershipWindSpeed()
 {
     if (!MembershipManager.GetAccess(STSWMMSFeatureFlagType.Settings_Environmental_Wind))
     {
         this._windSpeedDropdown.@value       = 0;
         this._windSpeedDropdown.interactable = false;
         this._windSpeedGroup.alpha           = 0.7f;
         this.SetWindSpeedInternal(false);
         this._windDirectionDropdown.@value       = 0;
         this._windDirectionDropdown.interactable = false;
         this._windDirectionGroup.alpha           = 0.7f;
         this.SetWindDirectionInternal(false);
     }
 }
 public void MSNGR_SaveFlightData(TFlightData flightData)
 {
     if (LoginManager.IsUserLoggedIn)
     {
         Shot shot = (new ShotFlightDataConverter()).Convert(flightData);
         SessionAndActivityManager.Instance.AddShotToSession(shot);
         if (!MembershipManager.GetAccess(STSWMMSFeatureFlagType.Settings_Watch_Me))
         {
             AppLog.Log("Shot was not saved to watch-me file because feature flag WatchMe is disabled.", true);
         }
         else
         {
             AppLog.Log("Start saving shot to watch-me file.", true);
             WatchmeFile.SaveShot(flightData, shot);
         }
     }
 }