コード例 #1
0
ファイル: GameData.cs プロジェクト: Gangrad/PingPong
 private void SaveData()
 {
     PlayerPrefsUtils.SetBool(RandomColorKey, _randomColorOnStart);
     PlayerPrefsUtils.SetColor(ColorKey, _ballColor);
     PlayerPrefs.SetInt(BestScoreKey, _bestScore);
     PlayerPrefsUtils.SetEnum(ControlTypeKey, _controlType);
 }
コード例 #2
0
 private void Start()
 {
     MatchDuration.OnValueChanged.AddListener(delegate(float value) {
         PlayerPrefs.SetInt(Properties.PlayerPrefs.MatchDuration, (int)value);
     });
     HealthPoints.OnValueChanged.AddListener(delegate(float value) {
         PlayerPrefs.SetInt(Properties.PlayerPrefs.HealthPoints, (int)value);
     });
     CanonDamage.OnValueChanged.AddListener(delegate(float value) {
         PlayerPrefs.SetInt(Properties.PlayerPrefs.CanonDamage, (int)value);
     });
     CanonPower.OnValueChanged.AddListener(delegate(float value) {
         PlayerPrefs.SetInt(Properties.PlayerPrefs.CanonPower, (int)value);
     });
     TurretSpeed.OnValueChanged.AddListener(delegate(float value) {
         PlayerPrefs.SetInt(Properties.PlayerPrefs.TurretSpeed, (int)value);
     });
     ReloadTime.OnValueChanged.AddListener(delegate(float value) {
         PlayerPrefs.SetInt(Properties.PlayerPrefs.ReloadTime, (int)value);
     });
     WaypointSeekRadius.OnValueChanged.AddListener(delegate(float value) {
         PlayerPrefs.SetInt(Properties.PlayerPrefs.WaypointSeekRadius, (int)value);
     });
     ExplosionDamage.OnValueChanged.AddListener(delegate(float value) {
         PlayerPrefs.SetInt(Properties.PlayerPrefs.ExplosionDamage, (int)value);
     });
     ExplosionRadius.OnValueChanged.AddListener(delegate(float value) {
         PlayerPrefs.SetInt(Properties.PlayerPrefs.ExplosionRadius, (int)value);
     });
     ExplosionCreateBustedTank.onValueChanged.AddListener(delegate(bool value) {
         PlayerPrefsUtils.SetBool(Properties.PlayerPrefs.ExplosionCreateBustedTank, value);
     });
     SecondsBetweenRefresh.OnValueChanged.AddListener(delegate(float value) {
         PlayerPrefs.SetInt(Properties.PlayerPrefs.SecondsBetweenRefresh, (int)value);
     });
     AlwaysPickBestChoice.onValueChanged.AddListener(delegate(bool value) {
         PlayerPrefsUtils.SetBool(Properties.PlayerPrefs.AlwaysPickBestChoice, value);
     });
     GridGap.OnValueChanged.AddListener(delegate(float value) {
         PlayerPrefs.SetInt(Properties.PlayerPrefs.GridGap, (int)value);
     });
     BonusPerSpawnNumber.OnValueChanged.AddListener(delegate(float value) {
         PlayerPrefs.SetInt(Properties.PlayerPrefs.BonusPerSpawnNumber, (int)value);
     });
     BonusPerSpawnFrequency.OnValueChanged.AddListener(delegate(float value) {
         PlayerPrefs.SetInt(Properties.PlayerPrefs.BonusPerSpawnFrequency, (int)value);
     });
     UpdateSettings();
 }