Exemple #1
0
 public override void Action()
 {
     Box.Range curRange = box.GetRange();
     box.SetRange(box.NextRange());
     transform.parent.parent.Rotate(new Vector3(0, curRange > box.GetRange() ? -120 : 30, 0));
     click.Play();
 }
Exemple #2
0
 private static void AssertContains(Box.Range range, float v, string name)
 {
     if (!range.Contains(v))
     {
         Assert.Fail(name + ": " + v + " is not contained by " + range);
     }
 }
Exemple #3
0
 private static float CheckAxis(float pos, Box.Range range, ref float inertia)
 {
     if (pos > range.Max)
     {
         if (inertia > 0)
         {
             inertia = -inertia;
         }
         pos = range.Max;
     }
     else
     if (pos < range.Min)
     {
         if (inertia < 0)
         {
             inertia = -inertia;
         }
         pos = range.Min;
     }
     return(pos);
 }