Example #1
0
        public static void LoadData()
        {
            s_tblSeSoundBuffs = new List <SESoundBuff>();
            SqliteDataReader reader = LocalDatabase.Instance.ReadFullTable("sound");

            while (reader.Read())
            {
                SESoundBuff se = new SESoundBuff();
                se.mID          = Convert.ToInt32(reader.GetString(reader.GetOrdinal("_id")));
                se.mName        = Convert.ToString(reader.GetString(reader.GetOrdinal("_name")));
                se.mLoop        = Convert.ToBoolean(reader.GetInt32(reader.GetOrdinal("loop")));
                se.mAudioType   = Convert.ToInt32(reader.GetString(reader.GetOrdinal("soundType")));
                se.mMode        = (AudioRolloffMode)Convert.ToInt32(reader.GetString(reader.GetOrdinal("rolloffType")));
                se.mDoppler     = Convert.ToSingle(reader.GetString(reader.GetOrdinal("doppler")));
                se.mSpatial     = Convert.ToSingle(reader.GetString(reader.GetOrdinal("spatial")));
                se.mVolume      = Convert.ToSingle(reader.GetString(reader.GetOrdinal("volume")));
                se.mMinDistance = Convert.ToSingle(reader.GetString(reader.GetOrdinal("minDistance")));
                se.mMaxDistance = Convert.ToSingle(reader.GetString(reader.GetOrdinal("maxDistance")));

                se.mVolume = Mathf.Clamp01(se.mVolume);
                s_tblSeSoundBuffs.Add(se);
            }
        }
Example #2
0
 public static bool MatchId(SESoundBuff iter, int id)
 {
     return(iter.mID == id);
 }