コード例 #1
0
ファイル: Prefs.cs プロジェクト: HouraiTeahouse/HouraiLib
 void Load()
 {
     if (Prefs.Exists(_key))
     {
         _value = Read();
     }
     else
     {
         _value = _defaultValue;
         Write(_defaultValue);
         Prefs.log.Info("Perf key \"{0}\" not found. Default value of {1} ({2}) loaded.", _key, _value, typeof(T).Name);
     }
 }
コード例 #2
0
        public void Initialize(string stageName)
        {
            BGM = Resource.Get <AudioClip>(_bgm);
            string key = GetKey(stageName);

            if (Prefs.Exists(key))
            {
                Weight = Prefs.GetFloat(key);
            }
            else
            {
                Weight = _baseWeight;
                Prefs.SetFloat(key, Weight);
            }
        }
コード例 #3
0
ファイル: Prefs.cs プロジェクト: HouraiTeahouse/HouraiLib
 public bool HasKey()
 {
     return(Prefs.Exists(_key));
 }