Class BaseMeanValueVariable<T0, T1>
Abstract base class for a float variable representing the mean (average) value of multiple variables.
public abstract class BaseMeanValueVariable<T0, T1> : FloatVariable, IAddable<float>, ISubtractable<float> where T0 : BaseScriptableVariable<T1> where T1 : struct, IComparable<T1>, IEquatable<T1>, IConvertible
Type Parameters
| Name | Type | Description |
|---|---|---|
T0 | The type of the variables to average, which must inherit from BaseScriptableVariable. | |
T1 | The value type of the variables, constrained to value types implementing IComparable, IEquatable, and IConvertible. |
Inheritance
object→Object→ScriptableObject→BaseScriptableVariable→BaseScriptableVariable<float>→FloatVariable→BaseMeanValueVariable<T0, T1>Implements
Inherited Members
- FloatVariable.Add(float)
- FloatVariable.Subtract(float)
- BaseScriptableVariable<float>.InitialValue
- BaseScriptableVariable<float>.RuntimeValue
- BaseScriptableVariable<float>.ResetRunTimeValue()
- BaseScriptableVariable<float>.GetValue()
- BaseScriptableVariable<float>.IsValid()
- BaseScriptableVariable<float>.OnAfterDeserialize()
- BaseScriptableVariable<float>.OnBeforeSerialize()
- BaseScriptableVariable.GetValue()
- BaseScriptableVariable.IsValid()
Fields
Properties
AverageValue
Gets the computed average value based on the current runtime values of variables.
protected abstract float AverageValue { get; }
Property Value
float
RuntimeValue
Gets the runtime value of the variable, which is the computed average of all referenced variables.
public override float RuntimeValue { get; }
Property Value
float