string GetOperationString(Vector2Operation operation)
        {
            switch (operation)
            {
            case Vector2Operation.DotProduct:
                return(string.Format("{0} = Dot({1},{2})", storeFloatResult, vectorA, vectorB));

            case Vector2Operation.Distance:
                return(string.Format("{0} = Distance({1},{2})", storeFloatResult, vectorA, vectorB));

            case Vector2Operation.Angle:
                return(string.Format("{0} = Angle({1},{2})", storeFloatResult, vectorA, vectorB));

            case Vector2Operation.Min:
                return(string.Format("{0} = Min({1},{2})", storeResult, vectorA, vectorB));

            case Vector2Operation.Max:
                return(string.Format("{0} = Max({1},{2})", storeResult, vectorA, vectorB));

            case Vector2Operation.MultiplyFloat:
                return(string.Format("{0} = {1} * {2}", storeResult, vectorA, floatB));

            case Vector2Operation.DivideFloat:
                return(string.Format("{0} = {1} / {2}", storeResult, vectorA, floatB));
            }
            return("");
        }
Ejemplo n.º 2
0
 public override void Reset()
 {
     vector1            = null;
     vector2            = null;
     operation          = Vector2Operation.Add;
     storeVector2Result = null;
     storeFloatResult   = null;
     everyFrame         = false;
 }
 public override void Reset()
 {
     vector1 = null;
     vector2 = null;
     operation = Vector2Operation.Add;
     storeVector2Result = null;
     storeFloatResult = null;
     everyFrame = false;
 }
        public override void Reset()
        {
            base.Reset();

            vector1            = null;
            vector2            = null;
            operation          = Vector2Operation.Add;
            storeVector2Result = null;
            storeFloatResult   = null;
        }