Beispiel #1
0
 protected virtual void DeserializeChildren(PersistanceReader ip)
 {
     while (ip.HasChild)
     {
         object obj = (object)ip.GetChild();
         if (obj is FootstepData)
         {
             this.m_Footsteps = obj as FootstepData;
         }
         else if (obj is SoundData)
         {
             this.m_Sound = obj as SoundData;
         }
         else if (obj is MusicData)
         {
             this.m_Music = obj as MusicData;
         }
         else if (obj is SpeechHues)
         {
             this.m_SpeechHues = obj as SpeechHues;
         }
         else if (obj is NotorietyHues)
         {
             this.m_NotorietyHues = obj as NotorietyHues;
         }
         else if (obj is Options)
         {
             this.m_Options = obj as Options;
         }
         else if (obj is ScreenLayout)
         {
             this.m_Layout = obj as ScreenLayout;
         }
         else if (obj is ScavengerAgent)
         {
             this.m_Scavenger = obj as ScavengerAgent;
         }
         else if (obj is RenderSettings)
         {
             this._renderSettings = obj as RenderSettings;
         }
     }
     if (this.m_Scavenger == null)
     {
         this.m_Scavenger = new ScavengerAgent();
     }
     if (this._renderSettings != null)
     {
         return;
     }
     this._renderSettings = new RenderSettings();
 }
Beispiel #2
0
 private Preferences(bool isLoading)
 {
     if (isLoading)
     {
         return;
     }
     this.m_Footsteps     = new FootstepData();
     this.m_Sound         = new SoundData();
     this.m_Music         = new MusicData();
     this.m_SpeechHues    = new SpeechHues();
     this.m_NotorietyHues = new NotorietyHues();
     this.m_Options       = new Options();
     this.m_Scavenger     = new ScavengerAgent();
     this.m_Layout        = new ScreenLayout();
     this._renderSettings = new RenderSettings();
 }