Ejemplo n.º 1
0
 public static void StopPlayback()
 {
     foreach (AnimationManager animationManager in SelectionExtensions.GetSelected <AnimationManager>())
     {
         animationManager.CurrentAnim.StopPlayback();
     }
 }
Ejemplo n.º 2
0
 public static void DeleteRecording()
 {
     foreach (AnimationManager animationManager in SelectionExtensions.GetSelected <AnimationManager>())
     {
         animationManager.CurrentAnim.Delete();
         animationManager.recordStartFrame = 0;
     }
 }
Ejemplo n.º 3
0
 public static void StopRecording()
 {
     foreach (AnimationManager animationManager in SelectionExtensions.GetSelected <AnimationManager>())
     {
         if (animationManager.record)
         {
             animationManager.record           = false;
             animationManager.recordStartFrame = animationManager.startFrameForPreviousRecord;
         }
     }
 }
Ejemplo n.º 4
0
 public static void StartRecording()
 {
     foreach (AnimationManager animationManager in SelectionExtensions.GetSelected <AnimationManager>())
     {
         if (!animationManager.record)
         {
             if (animationManager.CurrentRecordSettings.timeSpan.startFrame != MathfExtensions.NULL_INT)
             {
                 animationManager.recordStartFrame = animationManager.CurrentRecordSettings.timeSpan.startFrame;
             }
             else
             {
                 animationManager.recordStartFrame = animationManager.startFrameForPreviousRecord;
             }
             animationManager.startFrameForPreviousRecord = animationManager.recordStartFrame;
             animationManager.record = true;
         }
     }
 }
Ejemplo n.º 5
0
        public static void MakeWaypointsBetweenObjects()
        {
            Saw saw = SelectionExtensions.GetInstance <Saw>();

            Transform[] selectedTransforms = SelectionExtensions.GetSelected <Transform>();
            foreach (Transform selectedTrs in selectedTransforms)
            {
                foreach (Transform selectedTrs2 in selectedTransforms)
                {
                    if (selectedTrs != selectedTrs2)
                    {
                        LineSegment2D lineSegment = new LineSegment2D(selectedTrs.position, selectedTrs2.position);
                        float         distance    = 0;
                        do
                        {
                            Vector2 spawnPosition = lineSegment.GetPointWithDirectedDistance(distance);
                            Instantiate(saw.objectWithWaypoints.wayPointsParent.GetChild(0), spawnPosition, Quaternion.identity, saw.trs);
                            distance += saw.testDistanceBetweenWaypoints;
                        } while (distance <= lineSegment.GetLength());
                    }
                }
            }
        }
Ejemplo n.º 6
0
 public static void SetChosenInstances()
 {
     chosenInstances = SelectionExtensions.GetSelected <AnimationManager>();
 }