Esempio n. 1
0
        /// <summary>
        /// Constructs a new boolean property.
        /// </summary>
        /// <param name="value">The value this property should start as (if not starting random).</param>
        /// <param name="startRandom">Should this property's start value be randomized?</param>
        public uaiProperty(bool value, bool startRandom = false)
        {
            _propertyType = UAIPROPTYPE.BOOL;
            _name         = "Boolean property";

            _startRandom = startRandom;

            // Initialize unused properties
            _boolValue      = false;
            _intValue       = 0;
            _iminValue      = -200;
            _imaxValue      = 200;
            _iminStartValue = 0;
            _imaxStartValue = 0;

            _floatValue     = 0.0f;
            _fminValue      = -200.0f;
            _fmaxValue      = 200.0f;
            _fminStartValue = 0.0f;
            _fmaxStartValue = 100.0f;
        }
Esempio n. 2
0
        /// <summary>
        /// Constructs a new float property.
        /// </summary>
        /// <param name="value">The value this property should start as (if not starting random).</param>
        /// <param name="minValue">The minimum allowed value for this property.</param>
        /// <param name="maxValue">The maximum allowed value for this property.</param>
        /// <param name="startRandom">Should this property's start value be randomized?</param>
        /// <param name="minRandom">Minimum starting value. This is clamped to minValue.</param>
        /// <param name="maxRandom">Maximum starting value. This is clamped to maxValue</param>
        public uaiProperty(float value, float minValue = -200.0f, float maxValue = 200.0f,
                           bool startRandom            = false, float minRandom  = 0.0f, float maxRandom = 100.0f)
        {
            _propertyType = UAIPROPTYPE.FLOAT;
            _name         = "Float property";

            _fminValue  = minValue;
            _fmaxValue  = maxValue;
            _floatValue = value;

            _startRandom    = startRandom;
            _fminStartValue = minRandom;
            _fmaxStartValue = maxRandom;

            // Initialize unused properties
            _boolValue      = false;
            _intValue       = 0;
            _iminValue      = -200;
            _imaxValue      = 200;
            _iminStartValue = 0;
            _imaxStartValue = 100;
        }
Esempio n. 3
0
        /// <summary>
        /// Constructs a new integer property.
        /// </summary>
        /// <param name="value">The value this property should start as (if not starting random).</param>
        /// <param name="minValue">The minimum allowed value for this property.</param>
        /// <param name="maxValue">The maximum allowed value for this property.</param>
        /// <param name="startRandom">Should this property's start value be randomized?</param>
        /// <param name="minRandom">Minimum starting value. This is clamped to minValue.</param>
        /// <param name="maxRandom">Maximum starting value. This is clamped to maxValue</param>
        public uaiProperty(int value, int minValue = -200, int maxValue   = 200,
                           bool startRandom        = false, int minRandom = 0, int maxRandom = 100)
        {
            _propertyType = UAIPROPTYPE.INT;
            _name         = "Integer property";

            _iminValue = minValue;
            _imaxValue = maxValue;
            _intValue  = value;

            _startRandom    = startRandom;
            _iminStartValue = minRandom;
            _imaxStartValue = maxRandom;

            // Initialize unused properties
            _floatValue     = 0.0f;
            _fminValue      = -200.0f;
            _fmaxValue      = 200.0f;
            _fminStartValue = 0.0f;
            _fmaxStartValue = 100.0f;

            _boolValue = false;
        }