Esempio n. 1
0
        /// <summary>Initializes a new instance of the Behavior class.</summary>
        /// <param name="instanceProperties">Dictionary of properties to spawn this behavior instance with, if any.</param>
        protected Behavior(Dictionary <string, object> instanceProperties)
        {
            ID = 0;
            SetDefaultProperties();

            // If we're handed a set of propertyName-propertyValue pairs (as may have come from
            // persistence of the behavior or whatnot) then restore those as actual properties.
            if (instanceProperties != null)
            {
                // TODO: Test w/behavior persistence implementation...
                PropertyTools.SetProperties(this, instanceProperties);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the Behavior class
        /// </summary>
        /// <param name="instanceProperties">Dictionary of properties to spawn this behavior instance with, if any.</param>
        protected Behavior(Dictionary <string, object> instanceProperties)
        {
            this.ID = 0;
            this.SetDefaultProperties();

            // If we're handed a set of propertyName-propertyValue pairs (as may have come from
            // persistence of the behavior or whatnot) then restore those as actual properties.
            if (instanceProperties != null)
            {
                // @@@ TODO: Test w/behavior persistence implementation...
                // Adjusted as per feedback from thread:
                // http://www.wheelmud.net/Forums/tabid/59/aff/8/aft/1487/afv/topic/afpgj/2/Default.aspx
                PropertyTools.SetProperties(this, instanceProperties);
            }
        }
Esempio n. 3
0
 /// <summary>Initializes a new instance of the class.</summary>
 /// <param name="metadata">The metadata.</param>
 public BaseExportAttribute(IDictionary <string, object> metadata)
 {
     PropertyTools.SetProperties(this, metadata);
 }
Esempio n. 4
0
 /// <summary>Initializes a new instance of the <see cref="ExportCharacterCreationStateMachineAttribute"/> class.</summary>
 /// <param name="metadata">The metadata.</param>
 public ExportCharacterCreationStateMachineAttribute(IDictionary <string, object> metadata)
 {
     PropertyTools.SetProperties(this, metadata);
 }