Exemplo n.º 1
0
 public void DisableRawWeightMetadata()
 {
     if (!this.events.HasSubscribers())
     {
         this.rawWeightMetadata = null;
     }
 }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
 private float CalculateRawWeight(float time, WeightMetadata weightMetadataReceiver = null)
 {
     return(Weight.FromTime(
                this.TimeWrap,
                time,
                this.Duration,
                weightMetadataReceiver));
 }
Exemplo n.º 4
0
 public void EnableRawWeightMetadata()
 {
     this.rawWeightMetadata = new WeightMetadata();
 }
Exemplo n.º 5
0
 public float CalculateWeight(WeightMetadata rawWeightMetadataReceiver = null)
 {
     return(this.CalculateWeight(this.SimulatedTime, rawWeightMetadataReceiver));
 }