private void RemoteSettings_Updated() { GameSpeed = RemoteSettings.GetFloat("GameSpeed", GameSpeed); PlayerSpeed = RemoteSettings.GetFloat("PlayerSpeed", PlayerSpeed); EnemySpeed = RemoteSettings.GetFloat("EnemySpeed", EnemySpeed); TimeToSwitchHatchState = RemoteSettings.GetFloat("TimeToSwitchHatchState", TimeToSwitchHatchState); MainCameraSize = RemoteSettings.GetFloat("MainCameraSize", MainCameraSize); IsCanChangeDirectionInMovement = RemoteSettings.GetBool("IsCanChangeDirectionInMovement", IsCanChangeDirectionInMovement); var gamesRemoteSettings = new GamesRemoteSettings() { EnemySpeed = EnemySpeed, GameSpeed = GameSpeed, IsCanChangeDirectionInMovement = IsCanChangeDirectionInMovement, MainCameraSize = MainCameraSize, PlayerSpeed = PlayerSpeed, TimeToSwitchHatchState = TimeToSwitchHatchState }; SavingGlobalSettings.Settings.RemoteSettings = gamesRemoteSettings; SavingGlobalSettings.SaveGameData(); }
public static void ExitCollisionHandler(GameObject collectable) { SavingGlobalSettings.SaveGameData(); }