Пример #1
0
 public void ExecuteVector(ref WooState state, string varName, Expression expression)
 {
     Vector3 value = expression.EvaluateVector(ref state);
     Vector3 current = state.GetValueVector(varName);
     current.x += value.x;
     current.y += value.y;
     current.z += value.z;
     state.SetValue(varName, current);
 }
Пример #2
0
        public void ExecuteVector(ref WooState state, string varName, Expression expression)
        {
            Vector3 value   = expression.EvaluateVector(ref state);
            Vector3 current = state.GetValueVector(varName);

            current.x += value.x;
            current.y += value.y;
            current.z += value.z;
            state.SetValue(varName, current);
        }
Пример #3
0
 public Vector3 EvaluateVector(ref WooState state)
 {
     if (_Type == VarType.varVector)
     {
         return(state.GetValueVector(_Variable));
     }
     else
     {
         throw new EvaluateException("Float variables can't evaluate to vectors.\n");
     }
 }
Пример #4
0
 public Vector3 EvaluateVector(ref WooState state)
 {
     if (_Type == VarType.varVector)
         return state.GetValueVector(_Variable);
     else
         throw new EvaluateException("Float variables can't evaluate to vectors.\n");
 }