Ejemplo n.º 1
0
 void Clean()
 {
     _shape = shape;
     _duration = duration;
     _speed = speed;
     _looping = looping;
     _addRotation = addRotation;
     _upVector = upVector;
 }
Ejemplo n.º 2
0
 void OnGUI()
 {
     OTPathController.UpVector _vector = vector;
     GUI.Box(new Rect(2,2,110,150),"Orientation");
     _vector = (GUI.Toggle(new Rect(5,25,100,20),(_vector == OTPathController.UpVector.Follow),"Follow"))?OTPathController.UpVector.Follow:_vector;
     _vector = (GUI.Toggle(new Rect(5,50,100,20),(_vector == OTPathController.UpVector.InWard),"Inward"))?OTPathController.UpVector.InWard:_vector;
     _vector = (GUI.Toggle(new Rect(5,75,100,20),(_vector == OTPathController.UpVector.OutWard),"Outward"))?OTPathController.UpVector.OutWard:_vector;
     _vector = (GUI.Toggle(new Rect(5,100,100,20),(_vector == OTPathController.UpVector.Target),"Target"))?OTPathController.UpVector.Target:_vector;
     _vector = (GUI.Toggle(new Rect(5,125,100,20),(_vector == OTPathController.UpVector.None),"None"))?OTPathController.UpVector.None:_vector;
     if (vector!=_vector)
     {
         vector = _vector;
         GameObject racers = GameObject.Find("-Racers");
         OTPutOnPath[] o = racers.transform.GetComponentsInChildren<OTPutOnPath>();
         for (int c=0; c<o.Length; c++)
             o[c].upVector = vector;
     }
 }