public bool SmartCheckIndexType(object[] options, int i)
 {
     if (IsVector(options[i]) && i < options.Length)
     {
         TLVectors tempVect = new TLVectors(options[i]);
         if (CheckIndexFieldTypeByString(options, i, new string[] { "x", "y", "z" }, true))
         {
             options[i] = new TLVector3(tempVect.x, tempVect.y, tempVect.z, tempVect.isRadian ? "radian" : "translate");
             return(true);
         }
         else if (CheckIndexFieldTypeByString(options, i, new string[] { "x", "y" }, true))
         {
             options[i] = new TLVector2(tempVect.x, tempVect.y, tempVect.isRadian ? "radian" : "translate");
             return(true);
         }
         else if (CheckIndexFieldTypeByString(options, i, new string[] { "x", "y", "z", "w" }, true))
         {
             //options[i] = new TLVector3(tempVect.x, tempVect.y, tempVect.z, tempVect.w, tempVect.isRadian ? "translate" : "radian");
             return(true);
         }
         else if (CheckIndexFieldTypeByString(options, i, new string[] { "u", "v" }, true))
         {
             //options[i] = new TLVector3(tempVect.u, tempVect.v);
             return(true);
         }
         ;
     }
     return(false);
 }
Exemple #2
0
 public ExecParams(TLVector3 parameter)
 {
     this.parameter = parameter;
     Init();
 }
Exemple #3
0
 public TLImpulseTransform(ImpulseObject transform)
 {
     //this.transform = transform;
     this.position = new TLVector3("position", transform.body);
     this.rotation = new TLVector3("rotation", transform.body);
 }
Exemple #4
0
 public TLTransform(Transform transform)
 {
     //this.transform = transform;
     this.position = new TLVector3("position", transform, transform.position);
     this.rotation = new TLVector3("rotation", transform, transform.eulerAngles);
 }
Exemple #5
0
 public Exec(TLVector3 This)
 {
     x = new ExecParams(This);
     y = new ExecParams(This);
     z = new ExecParams(This);
 }