public void DisableRawWeightMetadata() { if (!this.events.HasSubscribers()) { this.rawWeightMetadata = null; } }
public float CalculateWeight(float time, WeightMetadata rawWeightMetadataReceiver = null) { float rawWeight = this.CalculateRawWeight(time, rawWeightMetadataReceiver); float weight = rawWeight; weight = Effect.CalculateWeight(weight, this.weights); float customWeightStimulus = 0.0f; switch (this.customWeight.Stimulus) { case EffectCustomWeightStimulus.RawWeight: customWeightStimulus = rawWeight; break; case EffectCustomWeightStimulus.Time: customWeightStimulus = time; break; case EffectCustomWeightStimulus.CalculatedWeight: default: customWeightStimulus = weight; break; } return(weight * this.customWeight.Curve.Evaluate(customWeightStimulus)); }
private float CalculateRawWeight(float time, WeightMetadata weightMetadataReceiver = null) { return(Weight.FromTime( this.TimeWrap, time, this.Duration, weightMetadataReceiver)); }
public void EnableRawWeightMetadata() { this.rawWeightMetadata = new WeightMetadata(); }
public float CalculateWeight(WeightMetadata rawWeightMetadataReceiver = null) { return(this.CalculateWeight(this.SimulatedTime, rawWeightMetadataReceiver)); }