//=========================================================================================
        /// <summary> 
        /// In this function each derived class should read its own data from
        /// the given XML node representing this object and its attributes. Base methods should 
        /// also be called as part of this process.
        /// </summary>
        /// 
        /// <param name="data"> 
        /// An object representing the xml data for this XMLObject. Data values should be 
        /// read from here.
        /// </param>
        //=========================================================================================
        public override void ReadXml( XmlObjectData data )
        {
            // Call base class function

            base.ReadXml(data);

            // Read all data:

            data.ReadString ( "NextScreen"     , ref m_next_screen      , ""    );
            data.ReadString ( "PreviousScreen" , ref m_previous_screen  , ""    );
        }
Esempio n. 2
0
        //=========================================================================================
        /// <summary> 
        /// In this function each derived class should read its own data from
        /// the given XML node representing this object and its attributes. Base methods should 
        /// also be called as part of this process.
        /// </summary>
        /// 
        /// <param name="data"> 
        /// An object representing the xml data for this XMLObject. Data values should be 
        /// read from here.
        /// </param>
        //=========================================================================================
        public override void ReadXml( XmlObjectData data )
        {
            // Call base class function

            base.ReadXml(data);

            // Read all data:

            data.ReadString ( "UseEvent"                    , ref m_use_event                   , ""        );
            data.ReadString ( "BackEvent"                   , ref m_back_event                  , ""        );
            data.ReadFloat  ( "ExpandTime"                  , ref m_expand_time                 , 1         );
            data.ReadFloat  ( "Expansion"                   , ref m_expansion                   , 4         );
            data.ReadFloat  ( "HighlightWobbleSpeed"        , ref m_highlight_wobble_speed      , 0.01f     );
            data.ReadFloat  ( "HighlightWobbleIntensity"    , ref m_highlight_wobble_intensity  , 8         );
            data.ReadString ( "FocusSound"                  , ref m_focus_sound                 , ""        );
            data.ReadString ( "UseSound"                    , ref m_use_sound                   , ""        );

            // Make sure expansion time is not near zero:

            if ( m_expand_time < 0.001f ) m_expand_time = 0.001f;
        }