예제 #1
0
        public override float Evaluate(EvalContext context)
        {
            int   generatedValue = random.Next(10000);
            float value          = ((float)generatedValue) * 0.0001f;

            return(value);
        }
예제 #2
0
        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));
        }
예제 #3
0
        public sealed override T Evaluate(EvalContext context)
        {
            if (timeChanged)
            {
                timeChanged = false;
                UpdateValue();
            }

            return(Value);
        }
예제 #4
0
 public sealed override T Evaluate(EvalContext context)
 {
     if (Left != null && Right != null)
     {
         return(Calculate(Left.Evaluate(context), Right.Evaluate(context)));
     }
     else
     {
         return(default(T));
     }
 }
예제 #5
0
 public sealed override T Evaluate(EvalContext context)
 {
     if (Operand != null)
     {
         return(Calculate(Operand.Evaluate(context)));
     }
     else
     {
         return(default(T));
     }
 }
예제 #6
0
 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));
     }
 }
예제 #7
0
        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);
        }
예제 #8
0
 public sealed override T Evaluate(EvalContext context)
 {
     return(default(T));
 }
예제 #9
0
 public abstract T Evaluate(EvalContext context);
예제 #10
0
 public override float Evaluate(EvalContext context)
 {
     return(evaluatedTime);
 }
예제 #11
0
 public sealed override T Evaluate(EvalContext context)
 {
     return(Value);
 }