public override float Evaluate(EvalContext context) { int generatedValue = random.Next(10000); float value = ((float)generatedValue) * 0.0001f; return(value); }
public sealed override T Evaluate(EvalContext context) { if (Condition != null && Cases != null) { float conditionValue = Condition.Evaluate(context); foreach (var item in Cases) { if (item.Min <= conditionValue && conditionValue <= item.Max) { if (item.Item != null) { return(item.Item.Evaluate(context)); } else { return(default(T)); } } } if (DefaultCase != null) { DefaultCase.Evaluate(context); } } return(default(T)); }
public sealed override T Evaluate(EvalContext context) { if (timeChanged) { timeChanged = false; UpdateValue(); } return(Value); }
public sealed override T Evaluate(EvalContext context) { if (Left != null && Right != null) { return(Calculate(Left.Evaluate(context), Right.Evaluate(context))); } else { return(default(T)); } }
public sealed override T Evaluate(EvalContext context) { if (Operand != null) { return(Calculate(Operand.Evaluate(context))); } else { return(default(T)); } }
public sealed override T Evaluate(EvalContext context) { if (Value1 != null && Value2 != null && Weight != null) { return(Interpolate(Value1.Evaluate(context), Value2.Evaluate(context), easingCurve.Ease(Weight.Evaluate(context)))); } else { return(default(T)); } }
public sealed override T Evaluate(EvalContext context) { if (UpdateMode == EvalCacheUpdateMode.UpdateAtEverytime) { valueChanged = true; } if (valueChanged) { valueChanged = false; if (Source != null) { value = Source.Evaluate(context); } else { value = default(T); } } return(value); }
public sealed override T Evaluate(EvalContext context) { return(default(T)); }
public abstract T Evaluate(EvalContext context);
public override float Evaluate(EvalContext context) { return(evaluatedTime); }
public sealed override T Evaluate(EvalContext context) { return(Value); }